home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 June: Reference Library / Dev.CD Jun 96 RL / Dev.CD Jun 96 RL.toast / Technical Documentation / develop / develop Issue 12 / develop Issue 12 code / Time Bases.sea / Time Bases / TimeBaseSimple / TimeBaseSimpleAux.p < prev   
MacBinary  |  1992-10-16  |  22.1 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert ZX81 Sinclair BASIC (image/sinclairBASIC) ext Supported
1% dexvert Applause Picture (image/applausePicture) ext Unsupported
1% dexvert bsdiff patch (other/bsdiffPatch) ext Unsupported
1% dexvert imgdiff patch (other/imgdiffPatch) ext Unsupported
1% dexvert MATLAB p-code (other/matlabPCode) ext Unsupported
1% dexvert WSUS Patch Storage File (other/wsusPatchStorageFile) ext Unsupported
1% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Fri Oct 16 18:28:40 1992, modified Fri Oct 16 18:28:40 1992, creator 'MPS ', type ASCII, 21923 bytes "TimeBaseSimpleAux.p" , at 0x5623 464 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% dearkID deark: macbinary default
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 13 54 69 6d 65 42 61 | 73 65 53 69 6d 70 6c 65 |..TimeBa|seSimple|
|00000010| 41 75 78 2e 70 00 00 00 | 00 00 00 00 00 00 00 00 |Aux.p...|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 55 a3 00 | 00 01 d0 a7 04 f2 98 a7 |.....U..|........|
|00000060| 04 f2 98 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 dc 1e 00 00 |........|........|
|00000080| 0d 28 2a 20 54 68 69 73 | 20 70 72 6f 63 65 64 75 |.(* This| procedu|
|00000090| 72 65 20 67 61 74 68 65 | 72 73 20 61 6c 6c 20 74 |re gathe|rs all t|
|000000a0| 68 65 20 69 6e 66 6f 20 | 61 62 6f 75 74 20 74 68 |he info |about th|
|000000b0| 65 20 63 75 72 72 65 6e | 74 20 6d 6f 76 69 65 27 |e curren|t movie'|
|000000c0| 73 20 74 69 6d 65 20 62 | 61 73 65 20 09 09 09 2a |s time b|ase ...*|
|000000d0| 29 0d 28 2a 20 72 6f 75 | 74 69 6e 65 73 20 74 68 |).(* rou|tines th|
|000000e0| 61 74 20 6d 6f 64 69 66 | 79 20 74 68 65 20 73 74 |at modif|y the st|
|000000f0| 61 74 65 20 6f 66 20 74 | 68 65 20 74 69 6d 65 20 |ate of t|he time |
|00000100| 62 61 73 65 20 77 69 6c | 6c 20 6b 65 65 70 20 74 |base wil|l keep t|
|00000110| 68 69 73 20 75 70 20 74 | 6f 20 64 61 74 65 20 09 |his up t|o date .|
|00000120| 09 2a 29 0d 28 2a 20 49 | 6d 70 6f 72 74 61 6e 74 |.*).(* I|mportant|
|00000130| 20 74 6f 20 6e 6f 74 65 | 20 68 65 72 65 20 69 73 | to note| here is|
|00000140| 20 74 68 61 74 20 64 75 | 72 61 74 69 6f 6e 20 69 | that du|ration i|
|00000150| 73 20 73 70 65 63 69 66 | 69 65 64 20 69 6e 20 6d |s specif|ied in m|
|00000160| 6f 76 69 65 20 73 63 61 | 6c 65 20 75 6e 69 74 73 |ovie sca|le units|
|00000170| 09 09 2a 29 0d 0d 50 52 | 4f 43 45 44 55 52 45 20 |..*)..PR|OCEDURE |
|00000180| 49 6e 69 74 54 42 52 65 | 63 6f 72 64 28 6d 6f 6f |InitTBRe|cord(moo|
|00000190| 76 3a 20 4d 6f 76 69 65 | 29 3b 0d 56 41 52 09 74 |v: Movie|);.VAR.t|
|000001a0| 62 3a 20 54 69 6d 65 42 | 61 73 65 3b 0d 09 09 73 |b: TimeB|ase;...s|
|000001b0| 63 61 6c 65 3a 09 54 69 | 6d 65 53 63 61 6c 65 3b |cale:.Ti|meScale;|
|000001c0| 0d 09 09 73 74 61 72 74 | 54 69 6d 65 56 61 6c 75 |...start|TimeValu|
|000001d0| 65 2c 0d 09 09 73 74 6f | 70 54 69 6d 65 56 61 6c |e,...sto|pTimeVal|
|000001e0| 75 65 3a 09 54 69 6d 65 | 56 61 6c 75 65 3b 0d 09 |ue:.Time|Value;..|
|000001f0| 09 63 6c 6f 63 6b 3a 09 | 09 43 6f 6d 70 6f 6e 65 |.clock:.|.Compone|
|00000200| 6e 74 49 6e 73 74 61 6e | 63 65 3b 0d 09 09 63 6c |ntInstan|ce;...cl|
|00000210| 6f 63 6b 4e 3a 09 53 74 | 72 69 6e 67 48 61 6e 64 |ockN:.St|ringHand|
|00000220| 6c 65 3b 0d 09 09 65 72 | 72 3a 09 4f 53 45 72 72 |le;...er|r:.OSErr|
|00000230| 3b 0d 09 09 63 64 3a 20 | 43 6f 6d 70 6f 6e 65 6e |;...cd: |Componen|
|00000240| 74 44 65 73 63 72 69 70 | 74 69 6f 6e 3b 0d 09 09 |tDescrip|tion;...|
|00000250| 0d 42 45 47 49 4e 0d 09 | 63 6c 6f 63 6b 4e 20 3a |.BEGIN..|clockN :|
|00000260| 3d 20 53 74 72 69 6e 67 | 48 61 6e 64 6c 65 28 4e |= String|Handle(N|
|00000270| 65 77 48 61 6e 64 6c 65 | 28 32 35 36 29 29 3b 20 |ewHandle|(256)); |
|00000280| 28 2a 20 67 6f 6f 64 20 | 6c 65 6e 67 74 68 20 66 |(* good |length f|
|00000290| 6f 72 20 73 74 72 69 6e | 67 20 09 09 2a 29 0d 09 |or strin|g ..*)..|
|000002a0| 0d 09 74 62 20 3a 3d 20 | 47 65 74 4d 6f 76 69 65 |..tb := |GetMovie|
|000002b0| 54 69 6d 65 42 61 73 65 | 28 67 4d 6f 6f 76 29 3b |TimeBase|(gMoov);|
|000002c0| 09 09 09 28 2a 20 67 65 | 74 20 6d 6f 76 69 65 27 |...(* ge|t movie'|
|000002d0| 73 20 74 69 6d 65 20 62 | 61 73 65 09 09 2a 29 0d |s time b|ase..*).|
|000002e0| 09 73 63 61 6c 65 20 3a | 3d 20 47 65 74 4d 6f 76 |.scale :|= GetMov|
|000002f0| 69 65 54 69 6d 65 53 63 | 61 6c 65 28 67 4d 6f 6f |ieTimeSc|ale(gMoo|
|00000300| 76 29 3b 09 09 28 2a 20 | 61 6e 64 20 74 68 65 20 |v);..(* |and the |
|00000310| 73 63 61 6c 65 09 09 09 | 09 2a 29 0d 09 63 6c 6f |scale...|.*)..clo|
|00000320| 63 6b 3a 3d 20 47 65 74 | 54 69 6d 65 42 61 73 65 |ck:= Get|TimeBase|
|00000330| 4d 61 73 74 65 72 43 6c | 6f 63 6b 28 74 62 29 3b |MasterCl|ock(tb);|
|00000340| 09 09 28 2a 20 69 6e 73 | 74 61 6e 63 65 20 6f 66 |..(* ins|tance of|
|00000350| 20 63 6c 6f 63 6b 20 62 | 65 69 6e 67 20 75 73 65 | clock b|eing use|
|00000360| 64 09 2a 29 0d 09 65 72 | 72 20 3a 3d 20 47 65 74 |d.*)..er|r := Get|
|00000370| 43 6f 6d 70 6f 6e 65 6e | 74 49 6e 66 6f 28 43 6f |Componen|tInfo(Co|
|00000380| 6d 70 6f 6e 65 6e 74 28 | 63 6c 6f 63 6b 29 2c 20 |mponent(|clock), |
|00000390| 63 64 2c 20 48 61 6e 64 | 6c 65 28 63 6c 6f 63 6b |cd, Hand|le(clock|
|000003a0| 4e 29 2c 20 4e 49 4c 2c | 20 4e 49 4c 29 3b 20 28 |N), NIL,| NIL); (|
|000003b0| 2a 20 61 6c 73 6f 20 74 | 61 6b 65 73 20 69 6e 73 |* also t|akes ins|
|000003c0| 74 61 6e 63 65 73 20 2a | 29 0d 09 0d 09 57 49 54 |tances *|)....WIT|
|000003d0| 48 20 67 54 42 53 74 61 | 74 65 20 44 4f 0d 09 20 |H gTBSta|te DO.. |
|000003e0| 20 42 45 47 49 4e 0d 20 | 09 09 74 42 61 73 65 20 | BEGIN. |..tBase |
|000003f0| 3a 3d 20 74 62 3b 0d 09 | 09 67 54 42 53 74 61 74 |:= tb;..|.gTBStat|
|00000400| 65 2e 66 6c 61 67 73 20 | 3a 3d 20 47 65 74 54 69 |e.flags |:= GetTi|
|00000410| 6d 65 42 61 73 65 46 6c | 61 67 73 28 74 62 29 3b |meBaseFl|ags(tb);|
|00000420| 0d 09 09 72 61 74 65 20 | 3a 3d 20 47 65 74 54 69 |...rate |:= GetTi|
|00000430| 6d 65 42 61 73 65 52 61 | 74 65 28 74 62 29 3b 0d |meBaseRa|te(tb);.|
|00000440| 0d 09 09 73 74 61 72 74 | 54 69 6d 65 56 61 6c 75 |...start|TimeValu|
|00000450| 65 20 3a 3d 20 47 65 74 | 54 69 6d 65 42 61 73 65 |e := Get|TimeBase|
|00000460| 53 74 61 72 74 54 69 6d | 65 28 74 62 2c 20 73 63 |StartTim|e(tb, sc|
|00000470| 61 6c 65 2c 20 73 74 61 | 72 74 54 69 6d 65 29 3b |ale, sta|rtTime);|
|00000480| 0d 09 09 73 74 6f 70 54 | 69 6d 65 56 61 6c 75 65 |...stopT|imeValue|
|00000490| 20 3a 3d 20 47 65 74 54 | 69 6d 65 42 61 73 65 53 | := GetT|imeBaseS|
|000004a0| 74 6f 70 54 69 6d 65 28 | 74 62 2c 20 73 63 61 6c |topTime(|tb, scal|
|000004b0| 65 2c 20 73 74 6f 70 54 | 69 6d 65 29 3b 0d 09 09 |e, stopT|ime);...|
|000004c0| 64 75 72 61 74 69 6f 6e | 20 3a 3d 20 73 74 6f 70 |duration| := stop|
|000004d0| 54 69 6d 65 56 61 6c 75 | 65 20 2d 20 73 74 61 72 |TimeValu|e - star|
|000004e0| 74 54 69 6d 65 56 61 6c | 75 65 3b 0d 09 09 49 46 |tTimeVal|ue;...IF|
|000004f0| 20 63 6c 6f 63 6b 4e 20 | 3c 3e 20 4e 49 4c 20 54 | clockN |<> NIL T|
|00000500| 48 45 4e 09 09 28 2a 20 | 68 61 76 65 20 61 20 6e |HEN..(* |have a n|
|00000510| 61 6d 65 20 2a 29 0d 09 | 20 20 09 20 20 42 45 47 |ame *)..| . BEG|
|00000520| 49 4e 0d 09 09 09 63 6c | 6f 63 6b 4e 61 6d 65 20 |IN....cl|ockName |
|00000530| 3a 3d 20 63 6c 6f 63 6b | 4e 5e 5e 3b 0d 09 20 20 |:= clock|N^^;.. |
|00000540| 20 20 20 45 4e 44 3b 0d | 09 09 6d 6f 6f 76 53 63 | END;.|..moovSc|
|00000550| 61 6c 65 20 3a 3d 20 73 | 63 61 6c 65 3b 0d 09 20 |ale := s|cale;.. |
|00000560| 20 45 4e 44 3b 0d 09 44 | 69 73 70 6f 73 65 48 61 | END;..D|isposeHa|
|00000570| 6e 64 6c 65 28 48 61 6e | 64 6c 65 28 63 6c 6f 63 |ndle(Han|dle(cloc|
|00000580| 6b 4e 29 29 3b 0d 45 4e | 44 3b 0d 0d 28 2a 20 43 |kN));.EN|D;..(* C|
|00000590| 68 61 6e 67 65 73 20 74 | 68 65 20 73 74 61 74 65 |hanges t|he state|
|000005a0| 20 6f 66 20 6c 6f 6f 70 | 69 6e 67 20 69 6e 20 74 | of loop|ing in t|
|000005b0| 68 65 20 6d 6f 76 69 65 | 20 69 66 20 6e 65 65 64 |he movie| if need|
|000005c0| 65 64 2e 0d 2a 29 0d 50 | 52 4f 43 45 44 55 52 45 |ed..*).P|ROCEDURE|
|000005d0| 20 53 65 74 54 42 4c 6f | 6f 70 28 6e 65 77 46 6c | SetTBLo|op(newFl|
|000005e0| 61 67 73 3a 20 4c 4f 4e | 47 49 4e 54 29 3b 0d 56 |ags: LON|GINT);.V|
|000005f0| 41 52 09 09 74 61 72 67 | 65 74 54 42 3a 20 54 69 |AR..targ|etTB: Ti|
|00000600| 6d 65 42 61 73 65 3b 0d | 0d 42 45 47 49 4e 0d 09 |meBase;.|.BEGIN..|
|00000610| 74 61 72 67 65 74 54 42 | 20 3a 3d 20 67 54 42 53 |targetTB| := gTBS|
|00000620| 74 61 74 65 2e 74 42 61 | 73 65 3b 0d 09 53 65 74 |tate.tBa|se;..Set|
|00000630| 54 69 6d 65 42 61 73 65 | 46 6c 61 67 73 28 74 61 |TimeBase|Flags(ta|
|00000640| 72 67 65 74 54 42 2c 20 | 6e 65 77 46 6c 61 67 73 |rgetTB, |newFlags|
|00000650| 29 3b 0d 09 67 54 42 53 | 74 61 74 65 2e 66 6c 61 |);..gTBS|tate.fla|
|00000660| 67 73 20 3a 3d 20 6e 65 | 77 46 6c 61 67 73 3b 0d |gs := ne|wFlags;.|
|00000670| 45 4e 44 3b 0d 0d 28 2a | 2a 2a 2a 2a 2a 2a 2a 2a |END;..(*|********|
|00000680| 2a 2a 20 41 75 78 69 6c | 69 61 72 79 20 72 6f 75 |** Auxil|iary rou|
|00000690| 74 69 6e 65 73 20 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |tines **|********|
|000006a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000006b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000006c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 29 0d |********|******).|
|000006d0| 0d 28 2a 20 4c 6f 61 64 | 73 20 69 6e 20 61 20 72 |.(* Load|s in a r|
|000006e0| 65 73 6f 75 72 63 65 20 | 6f 66 20 74 79 70 65 20 |esource |of type |
|000006f0| 52 43 54 23 2c 20 61 20 | 6c 69 73 74 20 6f 66 20 |RCT#, a |list of |
|00000700| 72 65 63 74 61 6e 67 6c | 65 73 20 61 6e 64 20 70 |rectangl|es and p|
|00000710| 61 73 73 65 73 20 62 61 | 63 6b 0d 20 20 20 74 68 |asses ba|ck. th|
|00000720| 65 20 72 65 63 74 20 70 | 6f 69 6e 74 65 64 20 74 |e rect p|ointed t|
|00000730| 6f 20 62 79 20 69 6e 64 | 65 78 0d 2a 29 0d 50 52 |o by ind|ex.*).PR|
|00000740| 4f 43 45 44 55 52 45 20 | 47 65 74 49 6e 64 52 65 |OCEDURE |GetIndRe|
|00000750| 63 74 28 49 44 3a 20 49 | 6e 74 65 67 65 72 3b 20 |ct(ID: I|nteger; |
|00000760| 69 6e 64 65 78 3a 20 49 | 6e 74 65 67 65 72 3b 20 |index: I|nteger; |
|00000770| 56 41 52 20 74 61 72 67 | 65 74 52 65 63 74 3a 20 |VAR targ|etRect: |
|00000780| 52 65 63 74 29 3b 0d 56 | 41 52 20 09 72 65 73 48 |Rect);.V|AR .resH|
|00000790| 61 6e 64 6c 65 3a 20 52 | 65 63 74 73 52 65 63 48 |andle: R|ectsRecH|
|000007a0| 61 6e 64 6c 65 3b 0d 09 | 09 74 68 65 52 65 63 74 |andle;..|.theRect|
|000007b0| 73 3a 20 50 74 72 3b 0d | 09 09 6c 69 6d 69 74 3a |s: Ptr;.|..limit:|
|000007c0| 20 49 6e 74 65 67 65 72 | 3b 0d 09 09 72 20 3a 20 | Integer|;...r : |
|000007d0| 52 65 63 74 3b 0d 09 09 | 0d 09 42 45 47 49 4e 0d |Rect;...|..BEGIN.|
|000007e0| 09 09 72 65 73 48 61 6e | 64 6c 65 20 3a 3d 20 52 |..resHan|dle := R|
|000007f0| 65 63 74 73 52 65 63 48 | 61 6e 64 6c 65 28 47 65 |ectsRecH|andle(Ge|
|00000800| 74 52 65 73 6f 75 72 63 | 65 28 27 52 43 54 23 27 |tResourc|e('RCT#'|
|00000810| 2c 20 49 44 29 29 3b 0d | 09 09 49 46 20 28 28 72 |, ID));.|..IF ((r|
|00000820| 65 73 48 61 6e 64 6c 65 | 20 3c 3e 20 4e 49 4c 29 |esHandle| <> NIL)|
|00000830| 20 41 4e 44 20 28 72 65 | 73 48 61 6e 64 6c 65 5e | AND (re|sHandle^|
|00000840| 5e 2e 72 65 63 74 43 6f | 75 6e 74 20 3e 3d 20 69 |^.rectCo|unt >= i|
|00000850| 6e 64 65 78 29 29 20 54 | 48 45 4e 0d 09 09 20 20 |ndex)) T|HEN... |
|00000860| 42 45 47 49 4e 0d 09 09 | 20 20 20 20 74 61 72 67 |BEGIN...| targ|
|00000870| 65 74 52 65 63 74 20 3a | 3d 20 72 65 73 48 61 6e |etRect :|= resHan|
|00000880| 64 6c 65 5e 5e 2e 72 65 | 63 74 73 5b 69 6e 64 65 |dle^^.re|cts[inde|
|00000890| 78 5d 3b 0d 09 09 20 20 | 45 4e 44 0d 09 09 45 4c |x];... |END...EL|
|000008a0| 53 45 0d 09 09 20 20 53 | 65 74 52 65 63 74 28 74 |SE... S|etRect(t|
|000008b0| 61 72 67 65 74 52 65 63 | 74 2c 20 30 2c 20 30 2c |argetRec|t, 0, 0,|
|000008c0| 20 30 2c 20 30 29 3b 20 | 28 2a 20 65 6d 70 74 79 | 0, 0); |(* empty|
|000008d0| 20 72 65 63 74 20 73 69 | 67 6e 61 6c 73 20 66 61 | rect si|gnals fa|
|000008e0| 69 6c 75 72 65 20 2a 29 | 0d 09 45 4e 44 3b 0d 0d |ilure *)|..END;..|
|000008f0| 0d 28 2a 20 48 61 6e 64 | 79 20 6c 69 74 74 6c 65 |.(* Hand|y little|
|00000900| 20 72 6f 75 74 69 6e 65 | 20 75 73 65 64 20 74 6f | routine| used to|
|00000910| 20 64 69 73 70 6c 61 79 | 20 76 61 6c 75 65 73 20 | display| values |
|00000920| 69 6e 20 68 65 78 20 2a | 29 0d 70 72 6f 63 65 64 |in hex *|).proced|
|00000930| 75 72 65 20 4e 75 6d 54 | 6f 48 65 78 20 28 6e 3a |ure NumT|oHex (n:|
|00000940| 20 4c 6f 6e 67 69 6e 74 | 3b 20 77 3a 20 49 6e 74 | Longint|; w: Int|
|00000950| 65 67 65 72 3b 20 76 61 | 72 20 73 3a 20 53 74 72 |eger; va|r s: Str|
|00000960| 32 35 35 29 3b 0d 09 63 | 6f 6e 73 74 0d 09 09 68 |255);..c|onst...h|
|00000970| 65 78 20 3d 20 27 30 31 | 32 33 34 35 36 37 38 39 |ex = '01|23456789|
|00000980| 41 42 43 44 45 46 27 3b | 0d 09 76 61 72 0d 09 09 |ABCDEF';|..var...|
|00000990| 69 3a 20 49 6e 74 65 67 | 65 72 3b 0d 62 65 67 69 |i: Integ|er;.begi|
|000009a0| 6e 0d 09 73 20 3a 3d 20 | 27 24 30 30 30 30 30 30 |n..s := |'$000000|
|000009b0| 30 30 27 3b 0d 09 66 6f | 72 20 69 20 3a 3d 20 30 |00';..fo|r i := 0|
|000009c0| 20 74 6f 20 77 20 2d 20 | 31 20 64 6f 0d 09 09 62 | to w - |1 do...b|
|000009d0| 65 67 69 6e 0d 09 09 09 | 73 5b 39 20 2d 20 69 5d |egin....|s[9 - i]|
|000009e0| 20 3a 3d 20 68 65 78 5b | 42 69 74 41 6e 64 28 6e | := hex[|BitAnd(n|
|000009f0| 2c 20 24 30 30 30 30 30 | 30 30 46 29 20 2b 20 31 |, $00000|00F) + 1|
|00000a00| 5d 3b 0d 09 09 09 6e 20 | 3a 3d 20 42 69 74 53 68 |];....n |:= BitSh|
|00000a10| 69 66 74 28 6e 2c 20 2d | 34 29 3b 0d 09 09 65 6e |ift(n, -|4);...en|
|00000a20| 64 3b 0d 65 6e 64 3b 0d | 0d 50 52 4f 43 45 44 55 |d;.end;.|.PROCEDU|
|00000a30| 52 45 20 45 72 72 6f 72 | 43 6f 6e 74 72 6f 6c 28 |RE Error|Control(|
|00000a40| 6d 65 73 73 61 67 65 3a | 20 53 74 72 32 35 35 29 |message:| Str255)|
|00000a50| 3b 0d 0d 42 45 47 49 4e | 0d 09 44 65 62 75 67 53 |;..BEGIN|..DebugS|
|00000a60| 74 72 28 6d 65 73 73 61 | 67 65 29 3b 0d 45 4e 44 |tr(messa|ge);.END|
|00000a70| 3b 0d 0d 28 2a 20 44 69 | 73 70 6c 61 79 20 73 74 |;..(* Di|splay st|
|00000a80| 61 74 65 20 76 61 6c 75 | 65 73 20 66 72 6f 6d 20 |ate valu|es from |
|00000a90| 54 69 6d 65 20 62 61 73 | 65 20 73 74 61 74 65 20 |Time bas|e state |
|00000aa0| 72 65 63 6f 72 64 20 2a | 29 0d 50 52 4f 43 45 44 |record *|).PROCED|
|00000ab0| 55 52 45 20 44 72 61 77 | 43 6f 6e 74 65 6e 74 73 |URE Draw|Contents|
|00000ac0| 3b 0d 56 41 52 09 09 72 | 3a 20 52 65 63 74 3b 0d |;.VAR..r|: Rect;.|
|00000ad0| 09 09 77 68 65 72 65 3a | 20 50 6f 69 6e 74 3b 0d |..where:| Point;.|
|00000ae0| 09 09 73 2c 20 73 32 3a | 20 53 54 52 32 35 35 3b |..s, s2:| STR255;|
|00000af0| 0d 09 09 61 46 69 78 3a | 20 46 69 78 65 64 3b 0d |...aFix:| Fixed;.|
|00000b00| 09 09 66 4e 75 6d 3a 20 | 49 6e 74 65 67 65 72 3b |..fNum: |Integer;|
|00000b10| 0d 09 09 73 79 73 46 6f | 6e 74 3a 20 53 74 72 32 |...sysFo|nt: Str2|
|00000b20| 35 35 3b 0d 09 09 73 74 | 61 72 74 54 69 6d 65 56 |55;...st|artTimeV|
|00000b30| 61 6c 75 65 2c 0d 09 09 | 73 74 6f 70 54 69 6d 65 |alue,...|stopTime|
|00000b40| 56 61 6c 75 65 20 3a 20 | 54 69 6d 65 56 61 6c 75 |Value : |TimeValu|
|00000b50| 65 3b 0d 09 09 73 74 61 | 72 74 54 69 6d 65 2c 20 |e;...sta|rtTime, |
|00000b60| 73 74 6f 70 54 69 6d 65 | 3a 20 54 69 6d 65 52 65 |stopTime|: TimeRe|
|00000b70| 63 6f 72 64 3b 0d 09 09 | 0d 42 45 47 49 4e 0d 09 |cord;...|.BEGIN..|
|00000b80| 47 65 74 46 4e 75 6d 28 | 27 43 6f 75 72 69 65 72 |GetFNum(|'Courier|
|00000b90| 27 2c 20 66 4e 75 6d 29 | 3b 20 28 2a 20 77 61 6e |', fNum)|; (* wan|
|00000ba0| 74 20 74 6f 20 73 65 74 | 20 6f 75 72 20 66 6f 6e |t to set| our fon|
|00000bb0| 74 09 09 2a 29 0d 09 0d | 09 49 46 20 66 4e 75 6d |t..*)...|.IF fNum|
|00000bc0| 20 3c 3e 20 30 20 54 48 | 45 4e 20 09 09 28 2a 20 | <> 0 TH|EN ..(* |
|00000bd0| 62 75 74 20 6f 6e 6c 79 | 20 77 68 65 6e 20 61 76 |but only| when av|
|00000be0| 61 69 6c 61 62 6c 65 20 | 09 2a 29 0d 09 09 54 65 |ailable |.*)...Te|
|00000bf0| 78 74 46 6f 6e 74 28 66 | 4e 75 6d 29 0d 20 20 20 |xtFont(f|Num). |
|00000c00| 20 45 4c 53 45 20 28 2a | 20 6d 61 6b 65 20 73 75 | ELSE (*| make su|
|00000c10| 72 65 20 74 68 61 74 20 | 30 20 69 73 20 74 68 65 |re that |0 is the|
|00000c20| 20 63 6f 72 72 65 63 74 | 20 72 65 73 75 6c 74 20 | correct| result |
|00000c30| 49 4d 20 56 49 20 31 32 | 2d 31 36 20 2a 29 0d 09 |IM VI 12|-16 *)..|
|00000c40| 20 20 42 45 47 49 4e 0d | 09 20 20 20 20 47 65 74 | BEGIN.|. Get|
|00000c50| 46 6f 6e 74 4e 61 6d 65 | 28 30 2c 20 73 79 73 46 |FontName|(0, sysF|
|00000c60| 6f 6e 74 29 3b 0d 09 09 | 49 46 20 45 71 75 61 6c |ont);...|IF Equal|
|00000c70| 53 74 72 69 6e 67 28 27 | 43 6f 75 72 69 65 72 27 |String('|Courier'|
|00000c80| 2c 20 73 79 73 46 6f 6e | 74 2c 20 46 41 4c 53 45 |, sysFon|t, FALSE|
|00000c90| 2c 20 46 41 4c 53 45 29 | 20 54 48 45 4e 0d 09 09 |, FALSE)| THEN...|
|00000ca0| 20 20 54 65 78 74 46 6f | 6e 74 28 66 4e 75 6d 29 | TextFo|nt(fNum)|
|00000cb0| 0d 09 20 20 45 4e 44 3b | 0d 0d 09 28 2a 20 44 69 |.. END;|...(* Di|
|00000cc0| 73 70 6c 61 79 20 6d 6f | 76 69 65 20 64 75 72 61 |splay mo|vie dura|
|00000cd0| 74 69 6f 6e 20 2a 29 0d | 0d 09 28 2a 20 41 6c 6c |tion *).|..(* All|
|00000ce0| 20 74 68 65 20 73 74 72 | 69 6e 67 73 20 61 72 65 | the str|ings are|
|00000cf0| 20 70 6f 73 74 69 6f 6e | 65 64 0d 09 20 20 20 75 | postion|ed.. u|
|00000d00| 73 69 6e 67 20 72 65 63 | 74 61 6e 67 6c 65 73 20 |sing rec|tangles |
|00000d10| 74 68 61 74 20 61 72 65 | 20 6b 65 70 74 20 69 6e |that are| kept in|
|00000d20| 20 61 20 52 43 54 23 20 | 72 65 73 6f 75 72 63 65 | a RCT# |resource|
|00000d30| 2e 0d 09 2a 29 0d 09 47 | 65 74 49 6e 64 52 65 63 |...*)..G|etIndRec|
|00000d40| 74 28 72 52 43 54 49 44 | 2c 20 30 2c 20 72 29 3b |t(rRCTID|, 0, r);|
|00000d50| 0d 09 4d 6f 76 65 54 6f | 28 72 2e 6c 65 66 74 2c |..MoveTo|(r.left,|
|00000d60| 20 72 2e 62 6f 74 74 6f | 6d 20 2d 20 33 29 3b 0d | r.botto|m - 3);.|
|00000d70| 09 44 72 61 77 53 74 72 | 69 6e 67 28 27 44 75 72 |.DrawStr|ing('Dur|
|00000d80| 61 74 69 6f 6e 20 3d 20 | 27 29 3b 0d 0d 09 4e 75 |ation = |');...Nu|
|00000d90| 6d 54 6f 53 74 72 69 6e | 67 28 67 54 42 53 74 61 |mToStrin|g(gTBSta|
|00000da0| 74 65 2e 64 75 72 61 74 | 69 6f 6e 2c 20 73 29 3b |te.durat|ion, s);|
|00000db0| 0d 09 47 65 74 49 6e 64 | 52 65 63 74 28 72 52 43 |..GetInd|Rect(rRC|
|00000dc0| 54 49 44 2c 20 31 2c 20 | 72 29 3b 0d 09 4d 6f 76 |TID, 1, |r);..Mov|
|00000dd0| 65 54 6f 28 72 2e 72 69 | 67 68 74 20 2d 20 28 53 |eTo(r.ri|ght - (S|
|00000de0| 74 72 69 6e 67 57 69 64 | 74 68 28 73 29 20 2b 20 |tringWid|th(s) + |
|00000df0| 32 29 2c 20 72 2e 62 6f | 74 74 6f 6d 20 2d 20 33 |2), r.bo|ttom - 3|
|00000e00| 29 3b 0d 0d 09 45 72 61 | 73 65 52 65 63 74 28 72 |);...Era|seRect(r|
|00000e10| 29 3b 0d 09 46 72 61 6d | 65 52 65 63 74 28 72 29 |);..Fram|eRect(r)|
|00000e20| 3b 0d 09 44 72 61 77 53 | 74 72 69 6e 67 28 73 29 |;..DrawS|tring(s)|
|00000e30| 3b 0d 0d 09 4e 75 6d 54 | 6f 53 74 72 69 6e 67 28 |;...NumT|oString(|
|00000e40| 67 54 42 53 74 61 74 65 | 2e 6d 6f 6f 76 53 63 61 |gTBState|.moovSca|
|00000e50| 6c 65 2c 20 73 29 3b 0d | 09 73 20 3a 3d 20 43 6f |le, s);.|.s := Co|
|00000e60| 6e 63 61 74 28 27 20 31 | 2f 27 2c 73 29 3b 0d 09 |ncat(' 1|/',s);..|
|00000e70| 47 65 74 49 6e 64 52 65 | 63 74 28 72 52 43 54 49 |GetIndRe|ct(rRCTI|
|00000e80| 44 2c 20 32 2c 20 72 29 | 3b 0d 09 4d 6f 76 65 54 |D, 2, r)|;..MoveT|
|00000e90| 6f 28 72 2e 72 69 67 68 | 74 20 2d 20 28 53 74 72 |o(r.righ|t - (Str|
|00000ea0| 69 6e 67 57 69 64 74 68 | 28 73 29 20 2b 20 32 29 |ingWidth|(s) + 2)|
|00000eb0| 2c 20 72 2e 62 6f 74 74 | 6f 6d 20 2d 20 33 29 3b |, r.bott|om - 3);|
|00000ec0| 0d 09 45 72 61 73 65 52 | 65 63 74 28 72 29 3b 0d |..EraseR|ect(r);.|
|00000ed0| 09 46 72 61 6d 65 52 65 | 63 74 28 72 29 3b 0d 09 |.FrameRe|ct(r);..|
|00000ee0| 44 72 61 77 53 74 72 69 | 6e 67 28 73 29 3b 0d 09 |DrawStri|ng(s);..|
|00000ef0| 4d 6f 76 65 28 32 2c 30 | 29 3b 0d 09 44 72 61 77 |Move(2,0|);..Draw|
|00000f00| 53 74 72 69 6e 67 28 27 | 74 68 2e 20 73 65 63 2e |String('|th. sec.|
|00000f10| 27 29 3b 20 20 09 09 0d | 0d 09 28 2a 20 44 69 73 |'); ...|..(* Dis|
|00000f20| 70 6c 61 79 20 6d 6f 76 | 69 65 20 72 61 74 65 20 |play mov|ie rate |
|00000f30| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 2a 29 0d 0d |informat|ion *)..|
|00000f40| 09 47 65 74 49 6e 64 52 | 65 63 74 28 72 52 43 54 |.GetIndR|ect(rRCT|
|00000f50| 49 44 2c 20 33 2c 20 72 | 29 3b 0d 09 4d 6f 76 65 |ID, 3, r|);..Move|
|00000f60| 54 6f 28 72 2e 6c 65 66 | 74 2c 20 72 2e 62 6f 74 |To(r.lef|t, r.bot|
|00000f70| 74 6f 6d 20 2d 20 33 29 | 3b 0d 09 44 72 61 77 53 |tom - 3)|;..DrawS|
|00000f80| 74 72 69 6e 67 28 27 52 | 61 74 65 20 53 65 74 74 |tring('R|ate Sett|
|00000f90| 69 6e 67 73 27 29 3b 0d | 0d 09 47 65 74 49 6e 64 |ings');.|..GetInd|
|00000fa0| 52 65 63 74 28 72 52 43 | 54 49 44 2c 20 34 2c 20 |Rect(rRC|TID, 4, |
|00000fb0| 72 29 3b 0d 09 4d 6f 76 | 65 54 6f 28 72 2e 6c 65 |r);..Mov|eTo(r.le|
|00000fc0| 66 74 2c 20 72 2e 62 6f | 74 74 6f 6d 20 2d 20 33 |ft, r.bo|ttom - 3|
|00000fd0| 29 3b 0d 09 44 72 61 77 | 53 74 72 69 6e 67 28 27 |);..Draw|String('|
|00000fe0| 43 75 72 72 65 6e 74 20 | 3d 20 27 29 3b 0d 0d 09 |Current |= ');...|
|00000ff0| 47 65 74 49 6e 64 52 65 | 63 74 28 72 52 43 54 49 |GetIndRe|ct(rRCTI|
|00001000| 44 2c 20 35 2c 20 72 29 | 3b 0d 09 4e 75 6d 54 6f |D, 5, r)|;..NumTo|
|00001010| 48 65 78 28 67 54 42 53 | 74 61 74 65 2e 72 61 74 |Hex(gTBS|tate.rat|
|00001020| 65 2c 38 2c 20 73 29 3b | 0d 09 4d 6f 76 65 54 6f |e,8, s);|..MoveTo|
|00001030| 28 72 2e 72 69 67 68 74 | 20 2d 20 28 53 74 72 69 |(r.right| - (Stri|
|00001040| 6e 67 57 69 64 74 68 28 | 73 29 20 2b 20 32 29 2c |ngWidth(|s) + 2),|
|00001050| 20 72 2e 62 6f 74 74 6f | 6d 20 2d 20 33 29 3b 0d | r.botto|m - 3);.|
|00001060| 0d 09 45 72 61 73 65 52 | 65 63 74 28 72 29 3b 0d |..EraseR|ect(r);.|
|00001070| 09 46 72 61 6d 65 52 65 | 63 74 28 72 29 3b 0d 09 |.FrameRe|ct(r);..|
|00001080| 44 72 61 77 53 74 72 69 | 6e 67 28 73 29 3b 0d 0d |DrawStri|ng(s);..|
|00001090| 09 47 65 74 49 6e 64 52 | 65 63 74 28 72 52 43 54 |.GetIndR|ect(rRCT|
|000010a0| 49 44 2c 20 36 2c 20 72 | 29 3b 0d 09 4d 6f 76 65 |ID, 6, r|);..Move|
|000010b0| 54 6f 28 72 2e 6c 65 66 | 74 2c 20 72 2e 62 6f 74 |To(r.lef|t, r.bot|
|000010c0| 74 6f 6d 20 2d 20 33 29 | 3b 0d 09 44 72 61 77 53 |tom - 3)|;..DrawS|
|000010d0| 74 72 69 6e 67 28 27 50 | 72 65 66 65 72 72 65 64 |tring('P|referred|
|000010e0| 20 3d 20 27 29 3b 0d 0d | 09 47 65 74 49 6e 64 52 | = ');..|.GetIndR|
|000010f0| 65 63 74 28 72 52 43 54 | 49 44 2c 20 37 2c 20 72 |ect(rRCT|ID, 7, r|
|00001100| 29 3b 0d 09 61 46 69 78 | 20 3a 3d 20 47 65 74 4d |);..aFix| := GetM|
|00001110| 6f 76 69 65 50 72 65 66 | 65 72 72 65 64 52 61 74 |oviePref|erredRat|
|00001120| 65 28 67 4d 6f 6f 76 29 | 3b 0d 09 4e 75 6d 54 6f |e(gMoov)|;..NumTo|
|00001130| 48 65 78 28 61 46 69 78 | 2c 38 2c 20 73 29 3b 0d |Hex(aFix|,8, s);.|
|00001140| 09 4d 6f 76 65 54 6f 28 | 72 2e 72 69 67 68 74 20 |.MoveTo(|r.right |
|00001150| 2d 20 28 53 74 72 69 6e | 67 57 69 64 74 68 28 73 |- (Strin|gWidth(s|
|00001160| 29 20 2b 20 32 29 2c 20 | 72 2e 62 6f 74 74 6f 6d |) + 2), |r.bottom|
|00001170| 20 2d 20 33 29 3b 0d 0d | 09 45 72 61 73 65 52 65 | - 3);..|.EraseRe|
|00001180| 63 74 28 72 29 3b 0d 09 | 46 72 61 6d 65 52 65 63 |ct(r);..|FrameRec|
|00001190| 74 28 72 29 3b 0d 09 44 | 72 61 77 53 74 72 69 6e |t(r);..D|rawStrin|
|000011a0| 67 28 73 29 3b 0d 09 0d | 09 28 2a 20 64 69 73 70 |g(s);...|.(* disp|
|000011b0| 6c 61 79 20 63 6c 6f 63 | 6b 20 6e 61 6d 65 20 2a |lay cloc|k name *|
|000011c0| 29 0d 09 0d 09 47 65 74 | 49 6e 64 52 65 63 74 28 |)....Get|IndRect(|
|000011d0| 72 52 43 54 49 44 2c 20 | 38 2c 20 72 29 3b 0d 09 |rRCTID, |8, r);..|
|000011e0| 4d 6f 76 65 54 6f 28 72 | 2e 6c 65 66 74 2c 20 72 |MoveTo(r|.left, r|
|000011f0| 2e 62 6f 74 74 6f 6d 20 | 2d 20 33 29 3b 0d 09 73 |.bottom |- 3);..s|
|00001200| 20 3a 3d 20 43 6f 6e 63 | 61 74 28 27 43 6c 6f 63 | := Conc|at('Cloc|
|00001210| 6b 4e 61 6d 65 20 3d 20 | 27 2c 67 54 42 53 74 61 |kName = |',gTBSta|
|00001220| 74 65 2e 63 6c 6f 63 6b | 4e 61 6d 65 29 3b 0d 09 |te.clock|Name);..|
|00001230| 44 72 61 77 53 74 72 69 | 6e 67 28 73 29 3b 0d 09 |DrawStri|ng(s);..|
|00001240| 0d 09 28 2a 20 44 69 73 | 70 6c 61 79 20 73 74 61 |..(* Dis|play sta|
|00001250| 72 74 20 61 6e 64 20 73 | 74 6f 70 20 76 61 6c 75 |rt and s|top valu|
|00001260| 65 73 20 2a 29 0d 09 0d | 09 73 74 61 72 74 54 69 |es *)...|.startTi|
|00001270| 6d 65 56 61 6c 75 65 20 | 3a 3d 20 47 65 74 54 69 |meValue |:= GetTi|
|00001280| 6d 65 42 61 73 65 53 74 | 61 72 74 54 69 6d 65 28 |meBaseSt|artTime(|
|00001290| 67 54 42 53 74 61 74 65 | 2e 74 42 61 73 65 2c 20 |gTBState|.tBase, |
|000012a0| 67 54 42 53 74 61 74 65 | 2e 6d 6f 6f 76 53 63 61 |gTBState|.moovSca|
|000012b0| 6c 65 2c 20 73 74 61 72 | 74 54 69 6d 65 29 3b 0d |le, star|tTime);.|
|000012c0| 09 73 74 6f 70 54 69 6d | 65 56 61 6c 75 65 20 3a |.stopTim|eValue :|
|000012d0| 3d 20 47 65 74 54 69 6d | 65 42 61 73 65 53 74 6f |= GetTim|eBaseSto|
|000012e0| 70 54 69 6d 65 28 67 54 | 42 53 74 61 74 65 2e 74 |pTime(gT|BState.t|
|000012f0| 42 61 73 65 2c 20 67 54 | 42 53 74 61 74 65 2e 6d |Base, gT|BState.m|
|00001300| 6f 6f 76 53 63 61 6c 65 | 2c 20 73 74 6f 70 54 69 |oovScale|, stopTi|
|00001310| 6d 65 29 3b 0d 0d 09 47 | 65 74 49 6e 64 52 65 63 |me);...G|etIndRec|
|00001320| 74 28 72 52 43 54 49 44 | 2c 20 39 2c 20 72 29 3b |t(rRCTID|, 9, r);|
|00001330| 0d 09 4d 6f 76 65 54 6f | 28 72 2e 6c 65 66 74 2c |..MoveTo|(r.left,|
|00001340| 20 72 2e 62 6f 74 74 6f | 6d 20 2d 20 33 29 3b 0d | r.botto|m - 3);.|
|00001350| 09 44 72 61 77 53 74 72 | 69 6e 67 28 27 53 74 61 |.DrawStr|ing('Sta|
|00001360| 72 74 20 20 20 20 3d 20 | 27 29 3b 0d 0d 09 4e 75 |rt = |');...Nu|
|00001370| 6d 54 6f 53 74 72 69 6e | 67 28 73 74 61 72 74 54 |mToStrin|g(startT|
|00001380| 69 6d 65 56 61 6c 75 65 | 2c 20 73 29 3b 0d 09 47 |imeValue|, s);..G|
|00001390| 65 74 49 6e 64 52 65 63 | 74 28 72 52 43 54 49 44 |etIndRec|t(rRCTID|
|000013a0| 2c 20 31 30 2c 20 72 29 | 3b 0d 09 4d 6f 76 65 54 |, 10, r)|;..MoveT|
|000013b0| 6f 28 72 2e 72 69 67 68 | 74 20 2d 20 28 53 74 72 |o(r.righ|t - (Str|
|000013c0| 69 6e 67 57 69 64 74 68 | 28 73 29 20 2b 20 32 29 |ingWidth|(s) + 2)|
|000013d0| 2c 20 72 2e 62 6f 74 74 | 6f 6d 20 2d 20 33 29 3b |, r.bott|om - 3);|
|000013e0| 0d 0d 09 45 72 61 73 65 | 52 65 63 74 28 72 29 3b |...Erase|Rect(r);|
|000013f0| 0d 09 46 72 61 6d 65 52 | 65 63 74 28 72 29 3b 0d |..FrameR|ect(r);.|
|00001400| 09 44 72 61 77 53 74 72 | 69 6e 67 28 73 29 3b 0d |.DrawStr|ing(s);.|
|00001410| 0d 09 47 65 74 49 6e 64 | 52 65 63 74 28 72 52 43 |..GetInd|Rect(rRC|
|00001420| 54 49 44 2c 20 31 31 2c | 20 72 29 3b 0d 09 4d 6f |TID, 11,| r);..Mo|
|00001430| 76 65 54 6f 28 72 2e 6c | 65 66 74 2c 20 72 2e 62 |veTo(r.l|eft, r.b|
|00001440| 6f 74 74 6f 6d 20 2d 20 | 33 29 3b 0d 09 44 72 61 |ottom - |3);..Dra|
|00001450| 77 53 74 72 69 6e 67 28 | 27 53 74 6f 70 20 20 20 |wString(|'Stop |
|00001460| 20 20 3d 20 27 29 3b 0d | 0d 09 4e 75 6d 54 6f 53 | = ');.|..NumToS|
|00001470| 74 72 69 6e 67 28 73 74 | 6f 70 54 69 6d 65 56 61 |tring(st|opTimeVa|
|00001480| 6c 75 65 2c 20 73 29 3b | 0d 09 47 65 74 49 6e 64 |lue, s);|..GetInd|
|00001490| 52 65 63 74 28 72 52 43 | 54 49 44 2c 20 31 32 2c |Rect(rRC|TID, 12,|
|000014a0| 20 72 29 3b 0d 09 4d 6f | 76 65 54 6f 28 72 2e 72 | r);..Mo|veTo(r.r|
|000014b0| 69 67 68 74 20 2d 20 28 | 53 74 72 69 6e 67 57 69 |ight - (|StringWi|
|000014c0| 64 74 68 28 73 29 20 2b | 20 32 29 2c 20 72 2e 62 |dth(s) +| 2), r.b|
|000014d0| 6f 74 74 6f 6d 20 2d 20 | 33 29 3b 0d 0d 09 45 72 |ottom - |3);...Er|
|000014e0| 61 73 65 52 65 63 74 28 | 72 29 3b 0d 09 46 72 61 |aseRect(|r);..Fra|
|000014f0| 6d 65 52 65 63 74 28 72 | 29 3b 0d 09 44 72 61 77 |meRect(r|);..Draw|
|00001500| 53 74 72 69 6e 67 28 73 | 29 3b 0d 0d 45 4e 44 3b |String(s|);..END;|
|00001510| 0d 0d 28 2a 20 62 6f 6f | 6c 65 61 6e 20 70 61 72 |..(* boo|lean par|
|00001520| 61 6d 65 74 65 72 20 74 | 65 6c 6c 73 20 69 66 20 |ameter t|ells if |
|00001530| 77 65 20 68 61 76 65 20 | 74 6f 20 65 72 61 73 65 |we have |to erase|
|00001540| 20 61 6e 64 20 66 72 61 | 6d 65 20 6f 72 20 6a 75 | and fra|me or ju|
|00001550| 73 74 20 72 65 64 72 61 | 77 20 74 68 65 20 73 74 |st redra|w the st|
|00001560| 72 69 6e 67 20 2a 29 0d | 50 52 4f 43 45 44 55 52 |ring *).|PROCEDUR|
|00001570| 45 20 44 72 61 77 53 68 | 75 74 74 6c 65 56 61 6c |E DrawSh|uttleVal|
|00001580| 75 65 28 64 6f 41 6c 6c | 3a 20 42 6f 6f 6c 65 61 |ue(doAll|: Boolea|
|00001590| 6e 29 3b 0d 56 41 52 09 | 09 76 61 6c 75 65 53 3a |n);.VAR.|.valueS:|
|000015a0| 09 09 53 74 72 32 35 35 | 3b 0d 09 09 74 68 65 52 |..Str255|;...theR|
|000015b0| 65 63 74 3a 09 52 65 63 | 74 3b 0d 09 09 74 62 3a |ect:.Rec|t;...tb:|
|000015c0| 20 54 69 6d 65 42 61 73 | 65 3b 0d 09 09 6f 75 74 | TimeBas|e;...out|
|000015d0| 54 69 6d 65 3a 20 54 69 | 6d 65 52 65 63 6f 72 64 |Time: Ti|meRecord|
|000015e0| 3b 0d 09 09 74 76 3a 20 | 54 69 6d 65 56 61 6c 75 |;...tv: |TimeValu|
|000015f0| 65 3b 0d 09 09 76 61 6c | 75 65 3a 09 49 6e 74 65 |e;...val|ue:.Inte|
|00001600| 67 65 72 3b 0d 42 45 47 | 49 4e 0d 09 74 68 65 52 |ger;.BEG|IN..theR|
|00001610| 65 63 74 20 3a 3d 20 67 | 53 68 75 74 74 6c 65 5e |ect := g|Shuttle^|
|00001620| 5e 2e 63 6f 6e 74 72 6c | 52 65 63 74 3b 0d 09 76 |^.contrl|Rect;..v|
|00001630| 61 6c 75 65 20 3a 3d 20 | 67 53 68 75 74 74 6c 65 |alue := |gShuttle|
|00001640| 5e 5e 2e 63 6f 6e 74 72 | 6c 56 61 6c 75 65 3b 0d |^^.contr|lValue;.|
|00001650| 09 49 6e 73 65 74 52 65 | 63 74 28 74 68 65 52 65 |.InsetRe|ct(theRe|
|00001660| 63 74 2c 20 32 38 2c 33 | 32 29 3b 0d 09 45 72 61 |ct, 28,3|2);..Era|
|00001670| 73 65 52 65 63 74 28 74 | 68 65 52 65 63 74 29 3b |seRect(t|heRect);|
|00001680| 0d 09 49 6e 73 65 74 52 | 65 63 74 28 74 68 65 52 |..InsetR|ect(theR|
|00001690| 65 63 74 2c 20 31 2c 20 | 31 29 3b 0d 09 49 46 20 |ect, 1, |1);..IF |
|000016a0| 64 6f 41 6c 6c 20 54 48 | 45 4e 0d 09 20 20 46 72 |doAll TH|EN.. Fr|
|000016b0| 61 6d 65 52 65 63 74 28 | 74 68 65 52 65 63 74 29 |ameRect(|theRect)|
|000016c0| 3b 0d 09 4d 6f 76 65 54 | 6f 28 74 68 65 52 65 63 |;..MoveT|o(theRec|
|000016d0| 74 2e 6c 65 66 74 2b 32 | 2c 20 74 68 65 52 65 63 |t.left+2|, theRec|
|000016e0| 74 2e 62 6f 74 74 6f 6d | 2d 34 29 3b 0d 09 4e 75 |t.bottom|-4);..Nu|
|000016f0| 6d 54 6f 53 74 72 69 6e | 67 28 76 61 6c 75 65 2c |mToStrin|g(value,|
|00001700| 20 76 61 6c 75 65 53 29 | 3b 0d 09 49 6e 73 65 74 | valueS)|;..Inset|
|00001710| 52 65 63 74 28 74 68 65 | 52 65 63 74 2c 20 31 2c |Rect(the|Rect, 1,|
|00001720| 20 31 29 3b 0d 09 44 72 | 61 77 53 74 72 69 6e 67 | 1);..Dr|awString|
|00001730| 28 76 61 6c 75 65 53 29 | 3b 0d 45 4e 44 3b 0d 7b |(valueS)|;.END;.{|
|00001740| 0d 53 68 75 74 74 6c 65 | 20 62 75 74 74 6f 6e 20 |.Shuttle| button |
|00001750| 63 61 6c 6c 73 20 74 68 | 69 73 20 70 72 6f 63 20 |calls th|is proc |
|00001760| 77 68 65 6e 20 74 72 61 | 63 6b 69 6e 67 20 73 6f |when tra|cking so|
|00001770| 20 74 68 61 74 20 49 20 | 63 61 6e 20 75 70 64 61 | that I |can upda|
|00001780| 74 65 20 74 68 65 20 76 | 61 6c 75 65 2e 20 49 74 |te the v|alue. It|
|00001790| 20 61 6c 73 6f 20 67 65 | 74 73 0d 63 61 6c 6c 65 | also ge|ts.calle|
|000017a0| 64 20 77 68 65 6e 20 53 | 65 74 43 74 72 6c 56 61 |d when S|etCtrlVa|
|000017b0| 6c 75 65 20 69 73 20 63 | 61 6c 6c 65 64 2e 0d 7d |lue is c|alled..}|
|000017c0| 0d 50 52 4f 43 45 44 55 | 52 45 20 54 72 61 63 6b |.PROCEDU|RE Track|
|000017d0| 69 6e 67 41 63 74 69 6f | 6e 50 72 6f 63 3b 0d 56 |ingActio|nProc;.V|
|000017e0| 41 52 09 09 76 61 6c 75 | 65 3a 09 49 6e 74 65 67 |AR..valu|e:.Integ|
|000017f0| 65 72 3b 0d 09 09 0d 42 | 45 47 49 4e 0d 0d 09 44 |er;....B|EGIN...D|
|00001800| 72 61 77 53 68 75 74 74 | 6c 65 56 61 6c 75 65 28 |rawShutt|leValue(|
|00001810| 46 41 4c 53 45 29 3b 0d | 09 0d 09 28 2a 20 54 68 |FALSE);.|...(* Th|
|00001820| 65 20 73 68 75 74 74 6c | 65 20 63 6f 6e 74 72 6f |e shuttl|e contro|
|00001830| 6c 20 61 6c 6c 6f 77 73 | 20 74 6f 20 73 63 61 6e |l allows| to scan|
|00001840| 20 74 68 65 20 6d 6f 76 | 69 65 20 66 6f 72 77 61 | the mov|ie forwa|
|00001850| 72 64 20 6f 72 20 62 61 | 63 6b 77 61 72 64 0d 09 |rd or ba|ckward..|
|00001860| 20 20 20 6f 6e 65 20 27 | 20 6d 6f 76 69 65 20 73 | one '| movie s|
|00001870| 63 61 6c 65 2f 31 30 27 | 20 74 69 63 6b 20 61 74 |cale/10'| tick at|
|00001880| 20 74 68 65 20 74 69 6d | 65 2e 0d 09 2a 29 0d 0d | the tim|e...*)..|
|00001890| 09 53 65 74 54 69 6d 65 | 42 61 73 65 56 61 6c 75 |.SetTime|BaseValu|
|000018a0| 65 28 67 54 42 53 74 61 | 74 65 2e 74 42 61 73 65 |e(gTBSta|te.tBase|
|000018b0| 2c 20 76 61 6c 75 65 2a | 31 30 2c 20 67 54 42 53 |, value*|10, gTBS|
|000018c0| 74 61 74 65 2e 6d 6f 6f | 76 53 63 61 6c 65 29 3b |tate.moo|vScale);|
|000018d0| 0d 09 4d 6f 76 69 65 73 | 54 61 73 6b 28 67 4d 6f |..Movies|Task(gMo|
|000018e0| 6f 76 2c 20 64 6f 54 68 | 65 52 69 67 68 74 54 68 |ov, doTh|eRightTh|
|000018f0| 69 6e 67 29 3b 20 28 2a | 20 6c 65 74 20 74 68 65 |ing); (*| let the|
|00001900| 20 6d 6f 76 69 65 20 6d | 6f 76 65 20 64 75 72 69 | movie m|ove duri|
|00001910| 6e 67 20 6c 6f 6e 67 20 | 74 72 61 63 6b 69 6e 67 |ng long |tracking|
|00001920| 73 20 2a 29 0d 45 4e 44 | 3b 0d 0d 50 52 4f 43 45 |s *).END|;..PROCE|
|00001930| 44 55 52 45 20 48 61 6e | 64 6c 65 47 6f 41 77 61 |DURE Han|dleGoAwa|
|00001940| 79 28 57 50 74 72 20 3a | 20 57 69 6e 64 6f 77 50 |y(WPtr :| WindowP|
|00001950| 74 72 3b 20 4d 4c 6f 63 | 20 3a 20 50 6f 69 6e 74 |tr; MLoc| : Point|
|00001960| 29 3b 0d 7b 0d 20 20 20 | 20 70 75 72 70 6f 73 65 |);.{. | purpose|
|00001970| 20 20 20 20 20 20 20 20 | 20 68 61 6e 64 6c 65 20 | | handle |
|00001980| 6d 6f 75 73 65 20 63 6c | 69 63 6b 20 69 6e 20 67 |mouse cl|ick in g|
|00001990| 6f 2d 61 77 61 79 20 62 | 6f 78 0d 7d 0d 56 41 52 |o-away b|ox.}.VAR|
|000019a0| 0d 20 20 57 50 65 65 6b | 20 20 20 20 20 20 20 20 |. WPeek| |
|000019b0| 20 20 20 20 20 3a 20 57 | 69 6e 64 6f 77 50 65 65 | : W|indowPee|
|000019c0| 6b 3b 20 20 20 20 20 20 | 20 20 20 20 20 7b 20 66 |k; | { f|
|000019d0| 6f 72 20 6c 6f 6f 6b 69 | 6e 67 20 61 74 20 77 69 |or looki|ng at wi|
|000019e0| 6e 64 6f 77 73 20 20 20 | 20 7d 0d 42 45 47 49 4e |ndows | }.BEGIN|
|000019f0| 0d 20 20 49 46 20 57 50 | 74 72 20 3d 20 46 72 6f |. IF WP|tr = Fro|
|00001a00| 6e 74 57 69 6e 64 6f 77 | 20 54 48 45 4e 20 20 20 |ntWindow| THEN |
|00001a10| 20 20 20 20 20 20 20 09 | 09 7b 20 69 66 20 69 74 | .|.{ if it|
|00001a20| 27 73 20 74 68 65 20 61 | 63 74 69 76 65 20 77 69 |'s the a|ctive wi|
|00001a30| 6e 64 6f 77 20 7d 0d 20 | 20 20 20 42 45 47 49 4e |ndow }. | BEGIN|
|00001a40| 0d 09 20 20 57 50 65 65 | 6b 20 3a 3d 20 57 69 6e |.. WPee|k := Win|
|00001a50| 64 6f 77 50 65 65 6b 28 | 57 50 74 72 29 3b 09 09 |dowPeek(|WPtr);..|
|00001a60| 09 7b 20 70 65 65 6b 20 | 61 74 20 74 68 65 20 77 |.{ peek |at the w|
|00001a70| 69 6e 64 6f 77 20 20 20 | 20 20 20 20 20 7d 0d 09 |indow | }..|
|00001a80| 20 20 49 46 20 54 72 61 | 63 6b 47 6f 41 77 61 79 | IF Tra|ckGoAway|
|00001a90| 28 57 50 74 72 2c 4d 4c | 6f 63 29 20 54 48 45 4e |(WPtr,ML|oc) THEN|
|00001aa0| 09 09 7b 20 20 20 61 6e | 64 20 74 68 65 20 62 6f |..{ an|d the bo|
|00001ab0| 78 20 69 73 20 63 6c 69 | 63 6b 65 64 20 20 7d 20 |x is cli|cked } |
|00001ac0| 0d 09 20 20 20 20 49 46 | 20 57 50 65 65 6b 5e 2e |.. IF| WPeek^.|
|00001ad0| 57 69 6e 64 6f 77 4b 69 | 6e 64 20 3d 20 75 73 65 |WindowKi|nd = use|
|00001ae0| 72 4b 69 6e 64 20 54 48 | 45 4e 7b 20 20 20 20 20 |rKind TH|EN{ |
|00001af0| 69 66 20 69 74 27 73 20 | 6f 75 72 20 77 69 6e 64 |if it's |our wind|
|00001b00| 6f 77 20 20 20 20 7d 20 | 20 20 0d 09 09 20 20 67 |ow } | ... g|
|00001b10| 44 6f 6e 65 46 6c 61 67 | 20 3a 3d 20 54 72 75 65 |DoneFlag| := True|
|00001b20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 09 | | .|
|00001b30| 7b 20 20 20 20 20 20 20 | 74 68 65 6e 20 74 69 6d |{ |then tim|
|00001b40| 65 20 74 6f 20 73 74 6f | 70 20 20 20 7d 0d 20 20 |e to sto|p }. |
|00001b50| 20 20 45 4e 44 20 20 20 | 0d 20 20 45 4c 53 45 20 | END |. ELSE |
|00001b60| 0d 20 20 20 20 53 65 6c | 65 63 74 57 69 6e 64 6f |. Sel|ectWindo|
|00001b70| 77 28 57 50 74 72 29 20 | 20 20 20 20 20 20 20 20 |w(WPtr) | |
|00001b80| 20 20 20 20 20 20 20 20 | 20 20 09 7b 20 65 6c 73 | | .{ els|
|00001b90| 65 20 6d 61 6b 65 20 69 | 74 20 61 63 74 69 76 65 |e make i|t active|
|00001ba0| 20 20 20 20 20 20 20 7d | 0d 45 4e 44 3b 20 7b 20 | }|.END; { |
|00001bb0| 6f 66 20 70 72 6f 63 20 | 48 61 6e 64 6c 65 47 6f |of proc |HandleGo|
|00001bc0| 41 77 61 79 20 7d 0d 0d | 28 2a 20 47 69 76 65 6e |Away }..|(* Given|
|00001bd0| 20 61 20 77 69 6e 64 6f | 77 20 61 6e 64 20 61 20 | a windo|w and a |
|00001be0| 63 6f 6e 74 72 6f 6c 20 | 72 65 74 75 72 6e 73 20 |control |returns |
|00001bf0| 74 68 65 20 69 64 20 6f | 66 20 74 68 65 20 63 6f |the id o|f the co|
|00001c00| 6e 74 72 6f 6c 2e 0d 20 | 20 20 4e 6f 74 65 20 74 |ntrol.. | Note t|
|00001c10| 68 61 74 20 74 68 69 73 | 20 77 6f 72 6b 73 20 6f |hat this| works o|
|00001c20| 6e 6c 79 20 62 65 63 61 | 75 73 65 20 49 20 6b 6e |nly beca|use I kn|
|00001c30| 6f 77 20 74 68 65 20 6f | 72 64 65 72 20 69 6e 20 |ow the o|rder in |
|00001c40| 77 68 69 63 68 20 63 6f | 6e 74 72 6f 6c 73 20 61 |which co|ntrols a|
|00001c50| 72 65 20 61 64 64 65 64 | 0d 20 20 20 69 6e 20 61 |re added|. in a|
|00001c60| 6e 64 20 61 6c 73 6f 20 | 74 68 61 74 20 63 6f 6e |nd also |that con|
|00001c70| 74 72 6f 6c 73 20 61 72 | 65 20 6e 6f 74 20 64 65 |trols ar|e not de|
|00001c80| 6c 65 74 65 64 2e 0d 20 | 20 20 49 66 20 72 65 73 |leted.. | If res|
|00001c90| 75 6c 74 20 69 73 20 2d | 31 20 74 68 65 6e 20 77 |ult is -|1 then w|
|00001ca0| 65 20 64 6f 6e 27 74 20 | 6b 6e 6f 77 20 77 68 61 |e don't |know wha|
|00001cb0| 74 20 63 6f 6e 74 72 6f | 6c 20 69 73 20 69 74 2e |t contro|l is it.|
|00001cc0| 0d 20 20 20 43 6f 6e 74 | 72 6f 6c 73 20 67 65 74 |. Cont|rols get|
|00001cd0| 20 61 74 74 61 63 68 65 | 64 20 66 69 72 73 20 63 | attache|d firs c|
|00001ce0| 6f 6d 65 20 66 69 72 73 | 74 20 73 65 72 76 65 64 |ome firs|t served|
|00001cf0| 2c 20 73 6f 20 74 68 65 | 20 6c 69 73 74 20 69 73 |, so the| list is|
|00001d00| 0d 20 20 20 6c 61 73 74 | 20 66 69 72 73 74 2e 0d |. last| first..|
|00001d10| 2a 29 0d 46 55 4e 43 54 | 49 4f 4e 20 47 65 74 43 |*).FUNCT|ION GetC|
|00001d20| 6f 6e 74 72 6f 6c 49 44 | 28 77 68 69 63 68 43 6f |ontrolID|(whichCo|
|00001d30| 6e 74 72 6f 6c 3a 20 43 | 6f 6e 74 72 6f 6c 48 61 |ntrol: C|ontrolHa|
|00001d40| 6e 64 6c 65 3b 20 77 69 | 6e 64 3a 20 57 69 6e 64 |ndle; wi|nd: Wind|
|00001d50| 6f 77 50 74 72 29 3a 20 | 49 6e 74 65 67 65 72 3b |owPtr): |Integer;|
|00001d60| 0d 56 41 52 09 6e 65 78 | 74 43 6f 6e 3a 20 43 6f |.VAR.nex|tCon: Co|
|00001d70| 6e 74 72 6f 6c 48 61 6e | 64 6c 65 3b 0d 09 63 6f |ntrolHan|dle;..co|
|00001d80| 75 6e 74 3a 20 49 6e 74 | 65 67 65 72 3b 0d 09 0d |unt: Int|eger;...|
|00001d90| 42 45 47 49 4e 0d 09 6e | 65 78 74 43 6f 6e 20 3a |BEGIN..n|extCon :|
|00001da0| 3d 20 57 69 6e 64 6f 77 | 50 65 65 6b 28 77 69 6e |= Window|Peek(win|
|00001db0| 64 29 5e 2e 63 6f 6e 74 | 72 6f 6c 4c 69 73 74 3b |d)^.cont|rolList;|
|00001dc0| 0d 09 63 6f 75 6e 74 20 | 3a 3d 20 6c 61 73 74 43 |..count |:= lastC|
|00001dd0| 6f 6e 74 72 6f 6c 3b 09 | 09 09 09 28 2a 20 6c 61 |ontrol;.|...(* la|
|00001de0| 73 74 20 63 6f 6e 74 72 | 6f 6c 20 2a 29 0d 0d 09 |st contr|ol *)...|
|00001df0| 57 48 49 4c 45 20 77 68 | 69 63 68 43 6f 6e 74 72 |WHILE wh|ichContr|
|00001e00| 6f 6c 20 3c 3e 20 6e 65 | 78 74 43 6f 6e 20 44 4f |ol <> ne|xtCon DO|
|00001e10| 0d 09 20 20 42 45 47 49 | 4e 0d 09 20 20 20 20 6e |.. BEGI|N.. n|
|00001e20| 65 78 74 43 6f 6e 20 3a | 3d 20 6e 65 78 74 43 6f |extCon :|= nextCo|
|00001e30| 6e 5e 5e 2e 6e 65 78 74 | 43 6f 6e 74 72 6f 6c 3b |n^^.next|Control;|
|00001e40| 0d 09 09 49 46 20 6e 65 | 78 74 43 6f 6e 20 3d 20 |...IF ne|xtCon = |
|00001e50| 4e 49 4c 20 54 48 45 4e | 0d 09 09 20 20 42 45 47 |NIL THEN|... BEG|
|00001e60| 49 4e 0d 09 09 20 20 20 | 20 63 6f 75 6e 74 20 3a |IN... | count :|
|00001e70| 3d 20 2d 31 3b 0d 09 09 | 09 4c 45 41 56 45 0d 09 |= -1;...|.LEAVE..|
|00001e80| 09 20 20 45 4e 44 0d 09 | 09 45 4c 53 45 0d 09 09 |. END..|.ELSE...|
|00001e90| 20 20 63 6f 75 6e 74 20 | 3a 3d 20 63 6f 75 6e 74 | count |:= count|
|00001ea0| 2d 31 3b 0d 09 20 20 45 | 4e 44 3b 0d 09 47 65 74 |-1;.. E|ND;..Get|
|00001eb0| 43 6f 6e 74 72 6f 6c 49 | 44 20 3a 3d 20 63 6f 75 |ControlI|D := cou|
|00001ec0| 6e 74 3b 0d 45 4e 44 3b | 0d 0d 28 2a 20 52 65 74 |nt;.END;|..(* Ret|
|00001ed0| 75 72 6e 73 20 74 68 65 | 20 63 6f 6e 74 72 6f 6c |urns the| control|
|00001ee0| 20 68 61 6e 64 6c 65 20 | 67 69 76 65 6e 20 61 6e | handle |given an|
|00001ef0| 20 63 6f 6e 74 72 6f 6c | 49 44 20 2a 29 0d 28 2a | control|ID *).(*|
|00001f00| 20 43 6f 6e 74 72 6f 6c | 73 20 61 72 65 20 70 75 | Control|s are pu|
|00001f10| 74 20 69 6e 20 74 68 65 | 20 6c 69 73 74 20 69 6e |t in the| list in|
|00001f20| 20 6c 61 73 74 20 69 6e | 20 66 69 72 73 74 20 69 | last in| first i|
|00001f30| 6e 20 6c 69 73 74 20 6f | 72 64 65 72 20 2a 29 0d |n list o|rder *).|
|00001f40| 46 55 4e 43 54 49 4f 4e | 20 47 65 74 43 6f 6e 74 |FUNCTION| GetCont|
|00001f50| 72 6f 6c 46 72 6f 6d 49 | 44 28 69 64 3a 20 49 6e |rolFromI|D(id: In|
|00001f60| 74 65 67 65 72 3b 77 69 | 6e 64 3a 20 57 69 6e 64 |teger;wi|nd: Wind|
|00001f70| 6f 77 50 74 72 29 3a 20 | 43 6f 6e 74 72 6f 6c 48 |owPtr): |ControlH|
|00001f80| 61 6e 64 6c 65 3b 0d 56 | 41 52 09 6e 65 78 74 43 |andle;.V|AR.nextC|
|00001f90| 6f 6e 3a 20 43 6f 6e 74 | 72 6f 6c 48 61 6e 64 6c |on: Cont|rolHandl|
|00001fa0| 65 3b 0d 09 63 6f 75 6e | 74 3a 20 49 6e 74 65 67 |e;..coun|t: Integ|
|00001fb0| 65 72 3b 0d 0d 42 45 47 | 49 4e 0d 09 6e 65 78 74 |er;..BEG|IN..next|
|00001fc0| 43 6f 6e 20 3a 3d 20 57 | 69 6e 64 6f 77 50 65 65 |Con := W|indowPee|
|00001fd0| 6b 28 77 69 6e 64 29 5e | 2e 63 6f 6e 74 72 6f 6c |k(wind)^|.control|
|00001fe0| 4c 69 73 74 3b 0d 09 46 | 4f 52 20 63 6f 75 6e 74 |List;..F|OR count|
|00001ff0| 20 3a 3d 20 31 20 54 4f | 20 6c 61 73 74 43 6f 6e | := 1 TO| lastCon|
|00002000| 74 72 6f 6c 20 2d 20 69 | 64 20 44 4f 0d 09 20 20 |trol - i|d DO.. |
|00002010| 42 45 47 49 4e 0d 20 20 | 09 20 20 20 20 6e 65 78 |BEGIN. |. nex|
|00002020| 74 43 6f 6e 20 3a 3d 20 | 6e 65 78 74 43 6f 6e 5e |tCon := |nextCon^|
|00002030| 5e 2e 6e 65 78 74 43 6f | 6e 74 72 6f 6c 3b 0d 09 |^.nextCo|ntrol;..|
|00002040| 09 49 46 20 6e 65 78 74 | 43 6f 6e 20 3d 20 4e 49 |.IF next|Con = NI|
|00002050| 4c 20 54 48 45 4e 20 4c | 45 41 56 45 0d 09 20 20 |L THEN L|EAVE.. |
|00002060| 45 4e 44 3b 0d 09 47 65 | 74 43 6f 6e 74 72 6f 6c |END;..Ge|tControl|
|00002070| 46 72 6f 6d 49 44 20 3a | 3d 20 6e 65 78 74 43 6f |FromID :|= nextCo|
|00002080| 6e 3b 0d 45 4e 44 3b 0d | 0d 50 52 4f 43 45 44 55 |n;.END;.|.PROCEDU|
|00002090| 52 45 20 53 65 74 4c 6f | 6f 70 28 20 69 64 3a 20 |RE SetLo|op( id: |
|000020a0| 49 4e 54 45 47 45 52 29 | 3b 0d 56 41 52 20 09 63 |INTEGER)|;.VAR .c|
|000020b0| 6f 6e 74 72 6f 6c 48 3a | 20 43 6f 6e 74 72 6f 6c |ontrolH:| Control|
|000020c0| 48 61 6e 64 6c 65 3b 0d | 0d 42 45 47 49 4e 0d 09 |Handle;.|.BEGIN..|
|000020d0| 43 41 53 45 20 69 64 20 | 4f 46 0d 09 20 20 31 32 |CASE id |OF.. 12|
|000020e0| 39 3a 0d 09 09 20 20 42 | 45 47 49 4e 0d 09 09 09 |9:... B|EGIN....|
|000020f0| 63 6f 6e 74 72 6f 6c 48 | 20 3a 3d 20 47 65 74 43 |controlH| := GetC|
|00002100| 6f 6e 74 72 6f 6c 46 72 | 6f 6d 49 44 28 31 32 39 |ontrolFr|omID(129|
|00002110| 2c 20 67 57 69 6e 64 29 | 3b 0d 09 09 09 49 46 20 |, gWind)|;....IF |
|00002120| 47 65 74 43 74 6c 56 61 | 6c 75 65 28 63 6f 6e 74 |GetCtlVa|lue(cont|
|00002130| 72 6f 6c 48 29 20 3d 20 | 30 20 54 48 45 4e 20 28 |rolH) = |0 THEN (|
|00002140| 2a 20 6c 6f 6f 70 20 69 | 73 20 6f 6e 20 2a 29 0d |* loop i|s on *).|
|00002150| 09 09 09 20 20 42 45 47 | 49 4e 0d 09 09 09 09 53 |... BEG|IN.....S|
|00002160| 65 74 54 42 4c 6f 6f 70 | 28 30 29 3b 20 28 2a 20 |etTBLoop|(0); (* |
|00002170| 6e 6f 20 6c 6f 6f 70 20 | 2a 29 0d 09 09 09 09 53 |no loop |*).....S|
|00002180| 65 74 43 74 6c 56 61 6c | 75 65 28 63 6f 6e 74 72 |etCtlVal|ue(contr|
|00002190| 6f 6c 48 2c 20 31 29 3b | 0d 09 09 09 09 63 6f 6e |olH, 1);|.....con|
|000021a0| 74 72 6f 6c 48 20 3a 3d | 20 47 65 74 43 6f 6e 74 |trolH :=| GetCont|
|000021b0| 72 6f 6c 46 72 6f 6d 49 | 44 28 31 33 30 2c 20 67 |rolFromI|D(130, g|
|000021c0| 57 69 6e 64 29 3b 0d 09 | 09 09 09 53 65 74 43 74 |Wind);..|...SetCt|
|000021d0| 6c 56 61 6c 75 65 28 63 | 6f 6e 74 72 6f 6c 48 2c |lValue(c|ontrolH,|
|000021e0| 20 30 29 3b 0d 09 09 09 | 09 63 6f 6e 74 72 6f 6c | 0);....|.control|
|000021f0| 48 20 3a 3d 20 47 65 74 | 43 6f 6e 74 72 6f 6c 46 |H := Get|ControlF|
|00002200| 72 6f 6d 49 44 28 31 33 | 31 2c 20 67 57 69 6e 64 |romID(13|1, gWind|
|00002210| 29 3b 0d 09 09 09 09 53 | 65 74 43 74 6c 56 61 6c |);.....S|etCtlVal|
|00002220| 75 65 28 63 6f 6e 74 72 | 6f 6c 48 2c 20 30 29 3b |ue(contr|olH, 0);|
|00002230| 0d 09 09 09 20 20 45 4e | 44 0d 09 09 20 20 45 4e |.... EN|D... EN|
|00002240| 44 3b 0d 09 20 20 31 33 | 30 3a 0d 09 09 20 20 42 |D;.. 13|0:... B|
|00002250| 45 47 49 4e 0d 09 09 09 | 63 6f 6e 74 72 6f 6c 48 |EGIN....|controlH|
|00002260| 20 3a 3d 20 47 65 74 43 | 6f 6e 74 72 6f 6c 46 72 | := GetC|ontrolFr|
|00002270| 6f 6d 49 44 28 31 33 30 | 2c 20 67 57 69 6e 64 29 |omID(130|, gWind)|
|00002280| 3b 0d 09 09 09 49 46 20 | 47 65 74 43 74 6c 56 61 |;....IF |GetCtlVa|
|00002290| 6c 75 65 28 63 6f 6e 74 | 72 6f 6c 48 29 20 3d 20 |lue(cont|rolH) = |
|000022a0| 30 20 54 48 45 4e 20 0d | 09 09 09 20 20 42 45 47 |0 THEN .|... BEG|
|000022b0| 49 4e 0d 09 09 09 09 53 | 65 74 54 42 4c 6f 6f 70 |IN.....S|etTBLoop|
|000022c0| 28 6c 6f 6f 70 54 69 6d | 65 42 61 73 65 29 3b 20 |(loopTim|eBase); |
|000022d0| 28 2a 20 6e 6f 72 6d 61 | 6c 20 6c 6f 6f 70 20 2a |(* norma|l loop *|
|000022e0| 29 0d 09 09 09 09 53 65 | 74 43 74 6c 56 61 6c 75 |).....Se|tCtlValu|
|000022f0| 65 28 63 6f 6e 74 72 6f | 6c 48 2c 20 31 29 3b 0d |e(contro|lH, 1);.|
|00002300| 09 09 09 09 63 6f 6e 74 | 72 6f 6c 48 20 3a 3d 20 |....cont|rolH := |
|00002310| 47 65 74 43 6f 6e 74 72 | 6f 6c 46 72 6f 6d 49 44 |GetContr|olFromID|
|00002320| 28 31 32 39 2c 20 67 57 | 69 6e 64 29 3b 0d 09 09 |(129, gW|ind);...|
|00002330| 09 09 53 65 74 43 74 6c | 56 61 6c 75 65 28 63 6f |..SetCtl|Value(co|
|00002340| 6e 74 72 6f 6c 48 2c 20 | 30 29 3b 0d 09 09 09 09 |ntrolH, |0);.....|
|00002350| 63 6f 6e 74 72 6f 6c 48 | 20 3a 3d 20 47 65 74 43 |controlH| := GetC|
|00002360| 6f 6e 74 72 6f 6c 46 72 | 6f 6d 49 44 28 31 33 31 |ontrolFr|omID(131|
|00002370| 2c 20 67 57 69 6e 64 29 | 3b 0d 09 09 09 09 53 65 |, gWind)|;.....Se|
|00002380| 74 43 74 6c 56 61 6c 75 | 65 28 63 6f 6e 74 72 6f |tCtlValu|e(contro|
|00002390| 6c 48 2c 20 30 29 3b 0d | 09 09 09 20 20 45 4e 44 |lH, 0);.|... END|
|000023a0| 0d 09 09 20 20 45 4e 44 | 3b 0d 09 20 20 31 33 31 |... END|;.. 131|
|000023b0| 3a 0d 09 09 20 20 42 45 | 47 49 4e 0d 09 09 09 63 |:... BE|GIN....c|
|000023c0| 6f 6e 74 72 6f 6c 48 20 | 3a 3d 20 47 65 74 43 6f |ontrolH |:= GetCo|
|000023d0| 6e 74 72 6f 6c 46 72 6f | 6d 49 44 28 31 33 31 2c |ntrolFro|mID(131,|
|000023e0| 20 67 57 69 6e 64 29 3b | 0d 09 09 09 49 46 20 47 | gWind);|....IF G|
|000023f0| 65 74 43 74 6c 56 61 6c | 75 65 28 63 6f 6e 74 72 |etCtlVal|ue(contr|
|00002400| 6f 6c 48 29 20 3d 20 30 | 20 54 48 45 4e 20 0d 09 |olH) = 0| THEN ..|
|00002410| 09 09 20 20 42 45 47 49 | 4e 0d 09 09 09 09 53 65 |.. BEGI|N.....Se|
|00002420| 74 54 42 4c 6f 6f 70 28 | 70 61 6c 69 6e 64 72 6f |tTBLoop(|palindro|
|00002430| 6d 65 4c 6f 6f 70 54 69 | 6d 65 42 61 73 65 29 3b |meLoopTi|meBase);|
|00002440| 20 28 2a 20 70 61 6c 69 | 6e 64 72 6f 6d 65 20 6c | (* pali|ndrome l|
|00002450| 6f 6f 70 20 2a 29 0d 09 | 09 09 09 53 65 74 43 74 |oop *)..|...SetCt|
|00002460| 6c 56 61 6c 75 65 28 63 | 6f 6e 74 72 6f 6c 48 2c |lValue(c|ontrolH,|
|00002470| 20 31 29 3b 0d 09 09 09 | 09 63 6f 6e 74 72 6f 6c | 1);....|.control|
|00002480| 48 20 3a 3d 20 47 65 74 | 43 6f 6e 74 72 6f 6c 46 |H := Get|ControlF|
|00002490| 72 6f 6d 49 44 28 31 32 | 39 2c 20 67 57 69 6e 64 |romID(12|9, gWind|
|000024a0| 29 3b 0d 09 09 09 09 53 | 65 74 43 74 6c 56 61 6c |);.....S|etCtlVal|
|000024b0| 75 65 28 63 6f 6e 74 72 | 6f 6c 48 2c 20 30 29 3b |ue(contr|olH, 0);|
|000024c0| 0d 09 09 09 09 63 6f 6e | 74 72 6f 6c 48 20 3a 3d |.....con|trolH :=|
|000024d0| 20 47 65 74 43 6f 6e 74 | 72 6f 6c 46 72 6f 6d 49 | GetCont|rolFromI|
|000024e0| 44 28 31 33 30 2c 20 67 | 57 69 6e 64 29 3b 0d 09 |D(130, g|Wind);..|
|000024f0| 09 09 09 53 65 74 43 74 | 6c 56 61 6c 75 65 28 63 |...SetCt|lValue(c|
|00002500| 6f 6e 74 72 6f 6c 48 2c | 20 30 29 3b 0d 09 09 09 |ontrolH,| 0);....|
|00002510| 20 20 45 4e 44 0d 09 09 | 20 20 45 4e 44 3b 0d 09 | END...| END;..|
|00002520| 45 4e 44 0d 45 4e 44 3b | 0d 0d 50 52 4f 43 45 44 |END.END;|..PROCED|
|00002530| 55 52 45 20 43 61 6c 6c | 53 65 74 43 74 6c 56 61 |URE Call|SetCtlVa|
|00002540| 6c 75 65 4e 6f 50 72 6f | 63 28 73 68 75 74 74 6c |lueNoPro|c(shuttl|
|00002550| 65 3a 20 43 6f 6e 74 72 | 6f 6c 48 61 6e 64 6c 65 |e: Contr|olHandle|
|00002560| 3b 20 6e 65 77 56 61 6c | 75 65 3a 20 49 6e 74 65 |; newVal|ue: Inte|
|00002570| 67 65 72 29 3b 0d 42 45 | 47 49 4e 0d 09 49 46 20 |ger);.BE|GIN..IF |
|00002580| 73 68 75 74 74 6c 65 5e | 5e 2e 63 6f 6e 74 72 6c |shuttle^|^.contrl|
|00002590| 56 61 6c 75 65 20 3c 3e | 20 6e 65 77 56 61 6c 75 |Value <>| newValu|
|000025a0| 65 20 54 48 45 4e 0d 09 | 20 20 42 45 47 49 4e 0d |e THEN..| BEGIN.|
|000025b0| 09 09 53 65 74 43 52 65 | 66 43 6f 6e 28 67 53 68 |..SetCRe|fCon(gSh|
|000025c0| 75 74 74 6c 65 2c 20 30 | 29 3b 20 28 2a 20 6d 61 |uttle, 0|); (* ma|
|000025d0| 6b 65 20 73 75 72 65 20 | 6d 79 20 74 72 61 63 6b |ke sure |my track|
|000025e0| 69 6e 67 20 69 73 20 6e | 6f 74 20 63 61 6c 6c 65 |ing is n|ot calle|
|000025f0| 64 20 2a 29 0d 09 0d 09 | 09 53 65 74 43 74 6c 56 |d *)....|.SetCtlV|
|00002600| 61 6c 75 65 28 73 68 75 | 74 74 6c 65 2c 20 6e 65 |alue(shu|ttle, ne|
|00002610| 77 56 61 6c 75 65 29 3b | 0d 09 09 0d 09 09 53 65 |wValue);|......Se|
|00002620| 74 43 52 65 66 43 6f 6e | 28 67 53 68 75 74 74 6c |tCRefCon|(gShuttl|
|00002630| 65 2c 20 4c 6f 6e 67 49 | 6e 74 28 40 54 72 61 63 |e, LongI|nt(@Trac|
|00002640| 6b 69 6e 67 41 63 74 69 | 6f 6e 50 72 6f 63 29 29 |kingActi|onProc))|
|00002650| 3b 0d 09 09 0d 09 09 44 | 72 61 77 53 68 75 74 74 |;......D|rawShutt|
|00002660| 6c 65 56 61 6c 75 65 28 | 46 41 4c 53 45 29 3b 0d |leValue(|FALSE);.|
|00002670| 09 20 20 45 4e 44 0d 45 | 4e 44 3b 0d 0d 50 52 4f |. END.E|ND;..PRO|
|00002680| 43 45 44 55 52 45 20 49 | 6e 69 74 43 6f 6e 74 72 |CEDURE I|nitContr|
|00002690| 6f 6c 73 28 6d 6f 6f 76 | 3a 20 4d 6f 76 69 65 3b |ols(moov|: Movie;|
|000026a0| 20 77 69 6e 64 3a 20 57 | 69 6e 64 6f 77 50 74 72 | wind: W|indowPtr|
|000026b0| 29 3b 0d 56 41 52 20 09 | 63 6f 6e 74 72 6f 6c 48 |);.VAR .|controlH|
|000026c0| 3a 20 43 6f 6e 74 72 6f | 6c 48 61 6e 64 6c 65 3b |: Contro|lHandle;|
|000026d0| 0d 09 09 76 61 6c 75 65 | 3a 09 49 6e 74 65 67 65 |...value|:.Intege|
|000026e0| 72 3b 0d 09 09 54 42 46 | 6c 61 67 73 3a 20 4c 4f |r;...TBF|lags: LO|
|000026f0| 4e 47 49 4e 54 3b 0d 09 | 09 72 61 74 65 3a 09 46 |NGINT;..|.rate:.F|
|00002700| 69 78 65 64 3b 0d 0d 46 | 55 4e 43 54 49 4f 4e 20 |ixed;..F|UNCTION |
|00002710| 53 68 75 74 74 6c 65 44 | 75 72 61 74 69 6f 6e 3a |ShuttleD|uration:|
|00002720| 20 54 69 6d 65 56 61 6c | 75 65 3b 0d 28 2a 20 74 | TimeVal|ue;.(* t|
|00002730| 68 65 20 6d 6f 76 69 65 | 20 64 75 72 61 74 69 6f |he movie| duratio|
|00002740| 6e 20 69 73 20 67 69 76 | 65 6e 20 69 6e 20 27 6e |n is giv|en in 'n|
|00002750| 6f 72 6d 61 6c 27 20 6d | 6f 76 69 65 20 72 61 74 |ormal' m|ovie rat|
|00002760| 65 20 75 6e 69 74 73 2c | 20 74 68 69 73 20 6d 61 |e units,| this ma|
|00002770| 6b 65 73 20 61 64 76 61 | 6e 63 69 6e 67 20 74 68 |kes adva|ncing th|
|00002780| 65 0d 20 20 20 6d 6f 76 | 69 65 20 75 73 69 6e 67 |e. mov|ie using|
|00002790| 20 74 68 65 20 73 68 75 | 74 74 6c 65 20 63 6f 6e | the shu|ttle con|
|000027a0| 74 72 6f 6c 20 61 20 6c | 69 74 74 6c 65 20 74 6f |trol a l|ittle to|
|000027b0| 6f 20 6d 75 63 68 20 77 | 6f 72 6b 2c 20 73 6f 20 |o much w|ork, so |
|000027c0| 66 6f 72 20 74 68 65 20 | 63 6f 6e 74 72 6f 6c 20 |for the |control |
|000027d0| 77 65 20 6b 65 65 70 0d | 20 20 20 74 68 65 20 64 |we keep.| the d|
|000027e0| 75 72 61 74 69 6f 6e 20 | 61 74 20 61 20 63 6f 61 |uration |at a coa|
|000027f0| 72 73 65 72 20 72 61 74 | 65 2e 20 57 65 20 74 61 |rser rat|e. We ta|
|00002800| 6b 65 20 74 68 65 20 6d | 6f 76 69 65 20 72 61 74 |ke the m|ovie rat|
|00002810| 65 20 61 6e 64 20 63 6f | 6e 76 65 72 74 20 69 74 |e and co|nvert it|
|00002820| 20 74 6f 20 69 74 73 20 | 31 2f 31 30 74 68 2e 0d | to its |1/10th..|
|00002830| 20 20 20 73 6f 20 69 66 | 20 74 68 65 20 6d 6f 76 | so if| the mov|
|00002840| 69 65 20 72 61 74 65 20 | 69 73 20 36 30 30 20 28 |ie rate |is 600 (|
|00002850| 6d 65 61 6e 69 6e 67 20 | 36 30 30 20 74 69 6d 65 |meaning |600 time|
|00002860| 20 75 6e 69 74 73 20 70 | 65 72 73 65 63 6f 6e 64 | units p|ersecond|
|00002870| 20 6f 72 20 61 62 6f 75 | 74 20 36 30 20 74 69 6d | or abou|t 60 tim|
|00002880| 65 20 75 6e 69 74 73 0d | 20 20 20 70 65 72 20 76 |e units.| per v|
|00002890| 69 64 65 6f 20 66 72 61 | 6d 65 29 20 74 68 65 20 |ideo fra|me) the |
|000028a0| 63 6f 6e 74 72 6f 6c 6c | 65 72 20 27 72 61 74 65 |controll|er 'rate|
|000028b0| 27 20 69 73 20 36 30 20 | 6f 72 20 36 20 6f 66 20 |' is 60 |or 6 of |
|000028c0| 69 74 73 20 75 6e 69 74 | 73 20 70 65 72 20 76 69 |its unit|s per vi|
|000028d0| 64 65 6f 20 66 72 61 6d | 65 2e 20 54 68 69 73 0d |deo fram|e. This.|
|000028e0| 20 20 20 70 72 6f 64 75 | 63 65 73 20 74 68 65 20 | produ|ces the |
|000028f0| 65 66 66 65 63 74 20 6f | 66 20 62 65 69 6e 67 20 |effect o|f being |
|00002900| 61 62 6c 65 20 74 6f 20 | 73 63 72 6f 6c 6c 20 74 |able to |scroll t|
|00002910| 68 72 6f 75 67 68 20 74 | 68 65 20 6d 6f 76 69 65 |hrough t|he movie|
|00002920| 20 77 69 74 68 6f 75 74 | 20 68 61 76 69 6e 67 20 | without| having |
|00002930| 74 6f 20 67 6f 0d 20 20 | 20 72 6f 75 6e 64 20 61 |to go. | round a|
|00002940| 6e 64 20 72 6f 75 6e 64 | 20 61 6e 64 20 72 6f 75 |nd round| and rou|
|00002950| 6e 64 20 61 6e 64 20 c9 | 0d 2a 29 0d 09 56 41 52 |nd and .|.*)..VAR|
|00002960| 09 09 74 72 3a 20 54 69 | 6d 65 52 65 63 6f 72 64 |..tr: Ti|meRecord|
|00002970| 3b 0d 09 09 09 6c 6f 63 | 61 6c 44 75 72 61 74 69 |;....loc|alDurati|
|00002980| 6f 6e 3a 20 54 69 6d 65 | 56 61 6c 75 65 3b 0d 09 |on: Time|Value;..|
|00002990| 09 09 73 68 75 74 74 6c | 65 53 63 61 6c 65 20 3a |..shuttl|eScale :|
|000029a0| 20 54 69 6d 65 53 63 61 | 6c 65 3b 0d 09 42 45 47 | TimeSca|le;..BEG|
|000029b0| 49 4e 0d 09 20 20 57 49 | 54 48 20 67 54 42 53 74 |IN.. WI|TH gTBSt|
|000029c0| 61 74 65 20 44 4f 0d 09 | 20 20 20 20 42 45 47 49 |ate DO..| BEGI|
|000029d0| 4e 0d 09 20 20 09 20 20 | 73 68 75 74 74 6c 65 53 |N.. . |shuttleS|
|000029e0| 63 61 6c 65 20 3a 3d 20 | 6d 6f 6f 76 53 63 61 6c |cale := |moovScal|
|000029f0| 65 20 44 49 56 20 31 30 | 3b 0d 09 09 20 20 6c 6f |e DIV 10|;... lo|
|00002a00| 63 61 6c 44 75 72 61 74 | 69 6f 6e 20 3a 3d 20 47 |calDurat|ion := G|
|00002a10| 65 74 54 69 6d 65 42 61 | 73 65 53 74 6f 70 54 69 |etTimeBa|seStopTi|
|00002a20| 6d 65 28 74 42 61 73 65 | 2c 20 73 68 75 74 74 6c |me(tBase|, shuttl|
|00002a30| 65 53 63 61 6c 65 2c 20 | 74 72 29 3b 0d 09 09 20 |eScale, |tr);... |
|00002a40| 20 6c 6f 63 61 6c 44 75 | 72 61 74 69 6f 6e 20 3a | localDu|ration :|
|00002a50| 3d 20 6c 6f 63 61 6c 44 | 75 72 61 74 69 6f 6e 20 |= localD|uration |
|00002a60| 2d 20 47 65 74 54 69 6d | 65 42 61 73 65 53 74 61 |- GetTim|eBaseSta|
|00002a70| 72 74 54 69 6d 65 28 74 | 42 61 73 65 2c 20 73 68 |rtTime(t|Base, sh|
|00002a80| 75 74 74 6c 65 53 63 61 | 6c 65 2c 20 74 72 29 3b |uttleSca|le, tr);|
|00002a90| 0d 09 20 20 20 20 45 4e | 44 3b 0d 09 20 20 53 68 |.. EN|D;.. Sh|
|00002aa0| 75 74 74 6c 65 44 75 72 | 61 74 69 6f 6e 20 3a 3d |uttleDur|ation :=|
|00002ab0| 20 6c 6f 63 61 6c 44 75 | 72 61 74 69 6f 6e 3b 0d | localDu|ration;.|
|00002ac0| 09 45 4e 44 3b 0d 0d 42 | 45 47 49 4e 0d 09 49 6e |.END;..B|EGIN..In|
|00002ad0| 69 74 54 42 52 65 63 6f | 72 64 28 6d 6f 6f 76 29 |itTBReco|rd(moov)|
|00002ae0| 3b 0d 0d 09 53 65 74 43 | 52 65 66 43 6f 6e 28 67 |;...SetC|RefCon(g|
|00002af0| 53 68 75 74 74 6c 65 2c | 20 30 29 3b 20 28 2a 20 |Shuttle,| 0); (* |
|00002b00| 6d 61 6b 65 20 73 75 72 | 65 20 6d 79 20 74 72 61 |make sur|e my tra|
|00002b10| 63 6b 69 6e 67 20 69 73 | 20 6e 6f 74 20 63 61 6c |cking is| not cal|
|00002b20| 6c 65 64 20 2a 29 0d 09 | 53 65 74 43 74 6c 4d 61 |led *)..|SetCtlMa|
|00002b30| 78 28 67 53 68 75 74 74 | 6c 65 2c 20 53 68 75 74 |x(gShutt|le, Shut|
|00002b40| 74 6c 65 44 75 72 61 74 | 69 6f 6e 29 3b 0d 09 53 |tleDurat|ion);..S|
|00002b50| 65 74 43 74 6c 4d 69 6e | 28 67 53 68 75 74 74 6c |etCtlMin|(gShuttl|
|00002b60| 65 2c 30 29 3b 0d 09 53 | 65 74 43 74 6c 56 61 6c |e,0);..S|etCtlVal|
|00002b70| 75 65 28 67 53 68 75 74 | 74 6c 65 2c 20 30 29 3b |ue(gShut|tle, 0);|
|00002b80| 0d 09 0d 09 53 65 74 43 | 52 65 66 43 6f 6e 28 67 |....SetC|RefCon(g|
|00002b90| 53 68 75 74 74 6c 65 2c | 20 4c 6f 6e 67 49 6e 74 |Shuttle,| LongInt|
|00002ba0| 28 40 54 72 61 63 6b 69 | 6e 67 41 63 74 69 6f 6e |(@Tracki|ngAction|
|00002bb0| 50 72 6f 63 29 29 3b 0d | 0d 09 54 42 46 6c 61 67 |Proc));.|..TBFlag|
|00002bc0| 73 20 3a 3d 20 67 54 42 | 53 74 61 74 65 2e 66 6c |s := gTB|State.fl|
|00002bd0| 61 67 73 3b 0d 09 43 41 | 53 45 20 54 42 46 6c 61 |ags;..CA|SE TBFla|
|00002be0| 67 73 20 4f 46 0d 09 20 | 20 30 3a 0d 09 09 20 20 |gs OF.. | 0:... |
|00002bf0| 42 45 47 49 4e 0d 09 09 | 09 63 6f 6e 74 72 6f 6c |BEGIN...|.control|
|00002c00| 48 20 3a 3d 20 47 65 74 | 43 6f 6e 74 72 6f 6c 46 |H := Get|ControlF|
|00002c10| 72 6f 6d 49 44 28 31 32 | 39 2c 20 67 57 69 6e 64 |romID(12|9, gWind|
|00002c20| 29 3b 0d 09 09 09 53 65 | 74 43 74 6c 56 61 6c 75 |);....Se|tCtlValu|
|00002c30| 65 28 63 6f 6e 74 72 6f | 6c 48 2c 20 31 29 3b 0d |e(contro|lH, 1);.|
|00002c40| 09 09 09 63 6f 6e 74 72 | 6f 6c 48 20 3a 3d 20 47 |...contr|olH := G|
|00002c50| 65 74 43 6f 6e 74 72 6f | 6c 46 72 6f 6d 49 44 28 |etContro|lFromID(|
|00002c60| 31 33 30 2c 20 67 57 69 | 6e 64 29 3b 0d 09 09 09 |130, gWi|nd);....|
|00002c70| 53 65 74 43 74 6c 56 61 | 6c 75 65 28 63 6f 6e 74 |SetCtlVa|lue(cont|
|00002c80| 72 6f 6c 48 2c 20 30 29 | 3b 0d 09 09 09 63 6f 6e |rolH, 0)|;....con|
|00002c90| 74 72 6f 6c 48 20 3a 3d | 20 47 65 74 43 6f 6e 74 |trolH :=| GetCont|
|00002ca0| 72 6f 6c 46 72 6f 6d 49 | 44 28 31 33 31 2c 20 67 |rolFromI|D(131, g|
|00002cb0| 57 69 6e 64 29 3b 0d 09 | 09 09 53 65 74 43 74 6c |Wind);..|..SetCtl|
|00002cc0| 56 61 6c 75 65 28 63 6f | 6e 74 72 6f 6c 48 2c 20 |Value(co|ntrolH, |
|00002cd0| 30 29 3b 0d 09 09 20 20 | 45 4e 44 3b 0d 09 20 20 |0);... |END;.. |
|00002ce0| 31 3a 0d 09 09 20 20 42 | 45 47 49 4e 0d 09 09 09 |1:... B|EGIN....|
|00002cf0| 63 6f 6e 74 72 6f 6c 48 | 20 3a 3d 20 47 65 74 43 |controlH| := GetC|
|00002d00| 6f 6e 74 72 6f 6c 46 72 | 6f 6d 49 44 28 31 33 30 |ontrolFr|omID(130|
|00002d10| 2c 20 67 57 69 6e 64 29 | 3b 0d 09 09 09 53 65 74 |, gWind)|;....Set|
|00002d20| 43 74 6c 56 61 6c 75 65 | 28 63 6f 6e 74 72 6f 6c |CtlValue|(control|
|00002d30| 48 2c 20 31 29 3b 0d 09 | 09 09 63 6f 6e 74 72 6f |H, 1);..|..contro|
|00002d40| 6c 48 20 3a 3d 20 47 65 | 74 43 6f 6e 74 72 6f 6c |lH := Ge|tControl|
|00002d50| 46 72 6f 6d 49 44 28 31 | 32 39 2c 20 67 57 69 6e |FromID(1|29, gWin|
|00002d60| 64 29 3b 0d 09 09 09 53 | 65 74 43 74 6c 56 61 6c |d);....S|etCtlVal|
|00002d70| 75 65 28 63 6f 6e 74 72 | 6f 6c 48 2c 20 30 29 3b |ue(contr|olH, 0);|
|00002d80| 0d 09 09 09 63 6f 6e 74 | 72 6f 6c 48 20 3a 3d 20 |....cont|rolH := |
|00002d90| 47 65 74 43 6f 6e 74 72 | 6f 6c 46 72 6f 6d 49 44 |GetContr|olFromID|
|00002da0| 28 31 33 31 2c 20 67 57 | 69 6e 64 29 3b 0d 09 09 |(131, gW|ind);...|
|00002db0| 09 53 65 74 43 74 6c 56 | 61 6c 75 65 28 63 6f 6e |.SetCtlV|alue(con|
|00002dc0| 74 72 6f 6c 48 2c 20 30 | 29 3b 0d 09 09 20 20 45 |trolH, 0|);... E|
|00002dd0| 4e 44 3b 0d 09 20 20 32 | 3a 0d 09 09 20 20 42 45 |ND;.. 2|:... BE|
|00002de0| 47 49 4e 0d 09 09 09 63 | 6f 6e 74 72 6f 6c 48 20 |GIN....c|ontrolH |
|00002df0| 3a 3d 20 47 65 74 43 6f | 6e 74 72 6f 6c 46 72 6f |:= GetCo|ntrolFro|
|00002e00| 6d 49 44 28 31 33 31 2c | 20 67 57 69 6e 64 29 3b |mID(131,| gWind);|
|00002e10| 0d 09 09 09 53 65 74 43 | 74 6c 56 61 6c 75 65 28 |....SetC|tlValue(|
|00002e20| 63 6f 6e 74 72 6f 6c 48 | 2c 20 31 29 3b 0d 09 09 |controlH|, 1);...|
|00002e30| 09 63 6f 6e 74 72 6f 6c | 48 20 3a 3d 20 47 65 74 |.control|H := Get|
|00002e40| 43 6f 6e 74 72 6f 6c 46 | 72 6f 6d 49 44 28 31 32 |ControlF|romID(12|
|00002e50| 39 2c 20 67 57 69 6e 64 | 29 3b 0d 09 09 09 53 65 |9, gWind|);....Se|
|00002e60| 74 43 74 6c 56 61 6c 75 | 65 28 63 6f 6e 74 72 6f |tCtlValu|e(contro|
|00002e70| 6c 48 2c 20 30 29 3b 0d | 09 09 09 63 6f 6e 74 72 |lH, 0);.|...contr|
|00002e80| 6f 6c 48 20 3a 3d 20 47 | 65 74 43 6f 6e 74 72 6f |olH := G|etContro|
|00002e90| 6c 46 72 6f 6d 49 44 28 | 31 33 30 2c 20 67 57 69 |lFromID(|130, gWi|
|00002ea0| 6e 64 29 3b 0d 09 09 09 | 53 65 74 43 74 6c 56 61 |nd);....|SetCtlVa|
|00002eb0| 6c 75 65 28 63 6f 6e 74 | 72 6f 6c 48 2c 20 30 29 |lue(cont|rolH, 0)|
|00002ec0| 3b 0d 09 09 20 20 45 4e | 44 3b 0d 09 45 4e 44 3b |;... EN|D;..END;|
|00002ed0| 20 28 2a 20 43 41 53 45 | 20 2a 29 0d 09 0d 09 28 | (* CASE| *)....(|
|00002ee0| 2a 20 69 6e 69 74 20 73 | 65 74 20 70 72 65 66 65 |* init s|et prefe|
|00002ef0| 72 72 65 64 20 72 61 74 | 65 20 62 75 74 74 6f 6e |rred rat|e button|
|00002f00| 20 2a 29 0d 09 63 6f 6e | 74 72 6f 6c 48 20 3a 3d | *)..con|trolH :=|
|00002f10| 20 47 65 74 43 6f 6e 74 | 72 6f 6c 46 72 6f 6d 49 | GetCont|rolFromI|
|00002f20| 44 28 31 33 32 2c 20 67 | 57 69 6e 64 29 3b 0d 09 |D(132, g|Wind);..|
|00002f30| 48 69 6c 69 74 65 43 6f | 6e 74 72 6f 6c 28 63 6f |HiliteCo|ntrol(co|
|00002f40| 6e 74 72 6f 6c 48 2c 20 | 32 35 35 29 3b 09 28 2a |ntrolH, |255);.(*|
|00002f50| 20 64 69 73 61 62 6c 65 | 20 75 6e 74 69 6c 20 74 | disable| until t|
|00002f60| 68 65 72 65 20 69 73 20 | 73 6f 6d 65 74 68 69 6e |here is |somethin|
|00002f70| 67 20 74 6f 20 64 6f 20 | 2a 29 0d 09 72 61 74 65 |g to do |*)..rate|
|00002f80| 20 3a 3d 20 47 65 74 4d | 6f 76 69 65 50 72 65 66 | := GetM|oviePref|
|00002f90| 65 72 72 65 64 52 61 74 | 65 28 67 4d 6f 6f 76 29 |erredRat|e(gMoov)|
|00002fa0| 3b 20 0d 09 53 65 74 43 | 52 65 66 43 6f 6e 28 63 |; ..SetC|RefCon(c|
|00002fb0| 6f 6e 74 72 6f 6c 48 2c | 20 72 61 74 65 29 3b 20 |ontrolH,| rate); |
|00002fc0| 0d 0d 09 28 2a 20 69 6e | 69 74 20 72 65 73 65 74 |...(* in|it reset|
|00002fd0| 20 70 72 65 66 65 72 72 | 65 64 20 72 61 74 65 20 | preferr|ed rate |
|00002fe0| 62 75 74 74 6f 6e 20 2a | 29 0d 09 63 6f 6e 74 72 |button *|)..contr|
|00002ff0| 6f 6c 48 20 3a 3d 20 47 | 65 74 43 6f 6e 74 72 6f |olH := G|etContro|
|00003000| 6c 46 72 6f 6d 49 44 28 | 31 33 33 2c 20 67 57 69 |lFromID(|133, gWi|
|00003010| 6e 64 29 3b 0d 09 72 61 | 74 65 20 3a 3d 20 47 65 |nd);..ra|te := Ge|
|00003020| 74 4d 6f 76 69 65 50 72 | 65 66 65 72 72 65 64 52 |tMoviePr|eferredR|
|00003030| 61 74 65 28 67 4d 6f 6f | 76 29 3b 20 0d 09 53 65 |ate(gMoo|v); ..Se|
|00003040| 74 43 52 65 66 43 6f 6e | 28 63 6f 6e 74 72 6f 6c |tCRefCon|(control|
|00003050| 48 2c 20 72 61 74 65 29 | 3b 20 0d 0d 45 4e 44 3b |H, rate)|; ..END;|
|00003060| 0d 0d 0d 46 55 4e 43 54 | 49 4f 4e 20 49 6e 41 72 |...FUNCT|ION InAr|
|00003070| 72 6f 77 73 28 6c 6f 63 | 3a 20 50 6f 69 6e 74 29 |rows(loc|: Point)|
|00003080| 3a 20 42 4f 4f 4c 45 41 | 4e 3b 0d 0d 42 45 47 49 |: BOOLEA|N;..BEGI|
|00003090| 4e 0d 09 49 6e 41 72 72 | 6f 77 73 20 3a 3d 20 50 |N..InArr|ows := P|
|000030a0| 74 49 6e 52 65 63 74 28 | 6c 6f 63 2c 20 67 41 72 |tInRect(|loc, gAr|
|000030b0| 72 6f 77 73 5e 5e 2e 70 | 69 63 46 72 61 6d 65 29 |rows^^.p|icFrame)|
|000030c0| 3b 0d 45 4e 44 3b 0d 0d | 28 2a 20 74 68 65 20 75 |;.END;..|(* the u|
|000030d0| 73 65 72 20 63 6c 69 63 | 6b 65 64 20 6f 6e 20 73 |ser clic|ked on s|
|000030e0| 65 74 20 72 61 74 65 20 | 73 6f 20 77 65 20 67 6f |et rate |so we go|
|000030f0| 20 61 68 65 61 64 20 61 | 6e 64 20 63 68 61 6e 67 | ahead a|nd chang|
|00003100| 65 20 74 68 65 20 70 72 | 65 66 65 72 72 65 64 20 |e the pr|eferred |
|00003110| 72 61 74 65 20 2a 29 0d | 50 52 4f 43 45 44 55 52 |rate *).|PROCEDUR|
|00003120| 45 20 53 65 74 50 72 65 | 66 65 72 72 65 64 52 61 |E SetPre|ferredRa|
|00003130| 74 65 28 69 64 3a 20 49 | 6e 74 65 67 65 72 29 3b |te(id: I|nteger);|
|00003140| 0d 56 41 52 09 63 6f 6e | 74 72 6f 6c 48 3a 09 09 |.VAR.con|trolH:..|
|00003150| 43 6f 6e 74 72 6f 6c 48 | 61 6e 64 6c 65 3b 0d 09 |ControlH|andle;..|
|00003160| 6e 65 77 3a 20 09 09 09 | 46 69 78 65 64 3b 0d 09 |new: ...|Fixed;..|
|00003170| 65 72 72 3a 20 09 09 09 | 4f 53 65 72 72 3b 0d 09 |err: ...|OSerr;..|
|00003180| 0d 42 45 47 49 4e 0d 09 | 63 6f 6e 74 72 6f 6c 48 |.BEGIN..|controlH|
|00003190| 20 3a 3d 20 47 65 74 43 | 6f 6e 74 72 6f 6c 46 72 | := GetC|ontrolFr|
|000031a0| 6f 6d 49 44 28 69 64 2c | 20 67 57 69 6e 64 29 3b |omID(id,| gWind);|
|000031b0| 0d 09 6e 65 77 20 3a 3d | 20 47 65 74 43 52 65 66 |..new :=| GetCRef|
|000031c0| 43 6f 6e 28 63 6f 6e 74 | 72 6f 6c 48 29 3b 0d 09 |Con(cont|rolH);..|
|000031d0| 53 65 74 4d 6f 76 69 65 | 50 72 65 66 65 72 72 65 |SetMovie|Preferre|
|000031e0| 64 52 61 74 65 28 67 4d | 6f 6f 76 2c 20 6e 65 77 |dRate(gM|oov, new|
|000031f0| 29 3b 0d 09 65 72 72 20 | 3a 3d 20 47 65 74 4d 6f |);..err |:= GetMo|
|00003200| 76 69 65 73 45 72 72 6f | 72 3b 0d 09 49 46 20 65 |viesErro|r;..IF e|
|00003210| 72 72 20 3c 3e 20 6e 6f | 45 72 72 20 54 48 45 4e |rr <> no|Err THEN|
|00003220| 0d 09 20 20 44 65 62 75 | 67 53 74 72 28 27 43 6f |.. Debu|gStr('Co|
|00003230| 75 6c 64 20 6e 6f 74 20 | 73 65 74 20 74 68 65 20 |uld not |set the |
|00003240| 6d 6f 76 69 65 20 72 61 | 74 65 27 29 3b 0d 09 65 |movie ra|te');..e|
|00003250| 72 72 20 3a 3d 20 4d 43 | 4d 6f 76 69 65 43 68 61 |rr := MC|MovieCha|
|00003260| 6e 67 65 64 28 67 4d 43 | 50 6c 61 79 2c 20 67 4d |nged(gMC|Play, gM|
|00003270| 6f 6f 76 29 3b 20 28 2a | 20 6c 65 74 20 74 68 65 |oov); (*| let the|
|00003280| 20 63 6f 6e 74 72 6f 6c | 6c 65 72 20 6b 6e 6f 77 | control|ler know|
|00003290| 20 6f 66 20 74 68 65 20 | 63 68 61 6e 67 65 20 2a | of the |change *|
|000032a0| 29 0d 09 48 69 6c 69 74 | 65 43 6f 6e 74 72 6f 6c |)..Hilit|eControl|
|000032b0| 28 63 6f 6e 74 72 6f 6c | 48 2c 20 32 35 35 29 3b |(control|H, 255);|
|000032c0| 20 28 2a 20 77 65 20 64 | 69 64 20 73 65 74 20 74 | (* we d|id set t|
|000032d0| 68 65 20 72 61 74 65 2c | 20 6e 6f 77 20 64 69 73 |he rate,| now dis|
|000032e0| 61 62 6c 65 20 2a 29 0d | 45 4e 44 3b 0d 0d 28 2a |able *).|END;..(*|
|000032f0| 20 77 65 20 75 73 65 20 | 74 68 65 20 63 6f 6e 74 | we use |the cont|
|00003300| 72 6f 6c 20 72 65 66 63 | 6f 6e 20 74 6f 20 6b 65 |rol refc|on to ke|
|00003310| 65 70 20 74 68 65 20 70 | 72 65 66 65 72 72 65 64 |ep the p|referred|
|00003320| 20 72 61 74 65 2c 20 61 | 6e 64 20 77 65 20 73 65 | rate, a|nd we se|
|00003330| 74 20 69 74 0d 20 20 20 | 69 66 20 74 68 65 20 75 |t it. |if the u|
|00003340| 73 65 72 20 63 6c 69 63 | 6b 73 20 6f 6e 20 74 68 |ser clic|ks on th|
|00003350| 65 20 73 65 74 20 62 75 | 74 74 6f 6e 2e 0d 2a 29 |e set bu|tton..*)|
|00003360| 0d 50 52 4f 43 45 44 55 | 52 45 20 53 65 74 52 65 |.PROCEDU|RE SetRe|
|00003370| 66 43 6f 6e 52 61 74 65 | 28 6e 65 77 3a 20 46 69 |fConRate|(new: Fi|
|00003380| 78 65 64 29 3b 0d 56 41 | 52 09 63 6f 6e 74 72 6f |xed);.VA|R.contro|
|00003390| 6c 48 3a 09 09 43 6f 6e | 74 72 6f 6c 48 61 6e 64 |lH:..Con|trolHand|
|000033a0| 6c 65 3b 0d 09 6f 6c 64 | 3a 20 46 69 78 65 64 3b |le;..old|: Fixed;|
|000033b0| 0d 09 0d 42 45 47 49 4e | 0d 09 63 6f 6e 74 72 6f |...BEGIN|..contro|
|000033c0| 6c 48 20 3a 3d 20 47 65 | 74 43 6f 6e 74 72 6f 6c |lH := Ge|tControl|
|000033d0| 46 72 6f 6d 49 44 28 31 | 33 32 2c 20 67 57 69 6e |FromID(1|32, gWin|
|000033e0| 64 29 3b 0d 09 6f 6c 64 | 20 3a 3d 20 47 65 74 43 |d);..old| := GetC|
|000033f0| 52 65 66 43 6f 6e 28 63 | 6f 6e 74 72 6f 6c 48 29 |RefCon(c|ontrolH)|
|00003400| 3b 0d 09 49 46 20 6e 65 | 77 20 3c 3e 20 6f 6c 64 |;..IF ne|w <> old|
|00003410| 20 54 48 45 4e 0d 09 20 | 20 42 45 47 49 4e 0d 09 | THEN.. | BEGIN..|
|00003420| 09 48 69 6c 69 74 65 43 | 6f 6e 74 72 6f 6c 28 63 |.HiliteC|ontrol(c|
|00003430| 6f 6e 74 72 6f 6c 48 2c | 20 30 29 3b 09 28 2a 20 |ontrolH,| 0);.(* |
|00003440| 65 6e 61 62 6c 65 20 74 | 6f 20 61 6c 6c 6f 77 20 |enable t|o allow |
|00003450| 63 68 61 6e 67 65 20 2a | 29 0d 09 09 53 65 74 43 |change *|)...SetC|
|00003460| 52 65 66 43 6f 6e 28 63 | 6f 6e 74 72 6f 6c 48 2c |RefCon(c|ontrolH,|
|00003470| 20 6e 65 77 29 3b 0d 09 | 20 20 45 4e 44 3b 0d 45 | new);..| END;.E|
|00003480| 4e 44 3b 0d 0d 28 2a 20 | 74 68 65 20 75 73 65 72 |ND;..(* |the user|
|00003490| 20 63 6c 69 63 6b 65 64 | 20 6f 6e 20 72 65 73 65 | clicked| on rese|
|000034a0| 74 20 72 61 74 65 3b 20 | 70 75 74 20 70 72 65 66 |t rate; |put pref|
|000034b0| 65 72 72 65 64 20 72 61 | 74 65 20 74 6f 20 74 68 |erred ra|te to th|
|000034c0| 65 20 76 61 6c 75 65 20 | 74 68 65 20 6d 6f 76 69 |e value |the movi|
|000034d0| 65 20 63 61 6d 65 0d 20 | 20 20 77 69 74 68 20 66 |e came. | with f|
|000034e0| 72 6f 6d 20 74 68 65 20 | 66 69 6c 65 20 2a 29 0d |rom the |file *).|
|000034f0| 50 52 4f 43 45 44 55 52 | 45 20 52 65 73 65 74 50 |PROCEDUR|E ResetP|
|00003500| 72 65 66 65 72 72 65 64 | 52 61 74 65 28 69 64 3a |referred|Rate(id:|
|00003510| 20 49 6e 74 65 67 65 72 | 29 3b 0d 56 41 52 09 63 | Integer|);.VAR.c|
|00003520| 6f 6e 74 72 6f 6c 48 3a | 09 09 43 6f 6e 74 72 6f |ontrolH:|..Contro|
|00003530| 6c 48 61 6e 64 6c 65 3b | 0d 09 65 6e 74 65 72 65 |lHandle;|..entere|
|00003540| 64 50 72 65 66 52 61 74 | 65 2c 0d 09 72 61 74 65 |dPrefRat|e,..rate|
|00003550| 46 72 6f 6d 46 69 6c 65 | 3a 09 46 69 78 65 64 3b |FromFile|:.Fixed;|
|00003560| 0d 09 65 72 72 3a 20 09 | 09 09 4f 53 65 72 72 3b |..err: .|..OSerr;|
|00003570| 0d 09 72 3a 09 09 09 09 | 52 65 63 74 3b 0d 09 0d |..r:....|Rect;...|
|00003580| 42 45 47 49 4e 0d 09 63 | 6f 6e 74 72 6f 6c 48 20 |BEGIN..c|ontrolH |
|00003590| 3a 3d 20 47 65 74 43 6f | 6e 74 72 6f 6c 46 72 6f |:= GetCo|ntrolFro|
|000035a0| 6d 49 44 28 69 64 2c 20 | 67 57 69 6e 64 29 3b 0d |mID(id, |gWind);.|
|000035b0| 09 72 61 74 65 46 72 6f | 6d 46 69 6c 65 20 3a 3d |.rateFro|mFile :=|
|000035c0| 20 47 65 74 43 52 65 66 | 43 6f 6e 28 63 6f 6e 74 | GetCRef|Con(cont|
|000035d0| 72 6f 6c 48 29 3b 0d 09 | 63 6f 6e 74 72 6f 6c 48 |rolH);..|controlH|
|000035e0| 20 3a 3d 20 47 65 74 43 | 6f 6e 74 72 6f 6c 46 72 | := GetC|ontrolFr|
|000035f0| 6f 6d 49 44 28 69 64 20 | 2d 20 31 2c 20 67 57 69 |omID(id |- 1, gWi|
|00003600| 6e 64 29 3b 20 28 2a 20 | 69 66 20 49 20 61 6d 20 |nd); (* |if I am |
|00003610| 68 65 72 65 2c 20 74 68 | 65 6e 20 74 68 65 20 70 |here, th|en the p|
|00003620| 72 65 76 69 6f 75 73 20 | 63 6f 6e 74 72 6f 6c 20 |revious |control |
|00003630| 2a 29 0d 0d 09 53 65 74 | 4d 6f 76 69 65 50 72 65 |*)...Set|MoviePre|
|00003640| 66 65 72 72 65 64 52 61 | 74 65 28 67 4d 6f 6f 76 |ferredRa|te(gMoov|
|00003650| 2c 20 72 61 74 65 46 72 | 6f 6d 46 69 6c 65 29 3b |, rateFr|omFile);|
|00003660| 0d 09 65 72 72 20 3a 3d | 20 4d 43 4d 6f 76 69 65 |..err :=| MCMovie|
|00003670| 43 68 61 6e 67 65 64 28 | 67 4d 43 50 6c 61 79 2c |Changed(|gMCPlay,|
|00003680| 20 67 4d 6f 6f 76 29 3b | 0d 09 47 65 74 49 6e 64 | gMoov);|..GetInd|
|00003690| 52 65 63 74 28 72 52 43 | 54 49 44 2c 20 37 2c 20 |Rect(rRC|TID, 7, |
|000036a0| 72 29 3b 0d 09 49 6e 76 | 61 6c 52 65 63 74 28 72 |r);..Inv|alRect(r|
|000036b0| 29 3b 0d 09 48 69 6c 69 | 74 65 43 6f 6e 74 72 6f |);..Hili|teContro|
|000036c0| 6c 28 63 6f 6e 74 72 6f | 6c 48 2c 20 32 35 35 29 |l(contro|lH, 255)|
|000036d0| 3b 09 28 2a 20 65 6e 61 | 62 6c 65 20 74 6f 20 61 |;.(* ena|ble to a|
|000036e0| 6c 6c 6f 77 20 63 68 61 | 6e 67 65 20 2a 29 0d 09 |llow cha|nge *)..|
|000036f0| 53 65 74 43 52 65 66 43 | 6f 6e 28 63 6f 6e 74 72 |SetCRefC|on(contr|
|00003700| 6f 6c 48 2c 20 72 61 74 | 65 46 72 6f 6d 46 69 6c |olH, rat|eFromFil|
|00003710| 65 29 3b 0d 45 4e 44 3b | 0d 0d 28 2a 20 57 68 65 |e);.END;|..(* Whe|
|00003720| 6e 20 74 68 65 20 75 73 | 65 72 20 63 6c 69 63 6b |n the us|er click|
|00003730| 73 20 6f 6e 20 74 68 65 | 20 61 72 72 6f 77 73 20 |s on the| arrows |
|00003740| 74 68 65 20 73 65 6c 65 | 63 74 65 64 20 72 61 74 |the sele|cted rat|
|00003750| 65 20 64 65 63 72 65 61 | 73 65 73 20 6f 72 20 69 |e decrea|ses or i|
|00003760| 6e 63 72 65 61 73 65 73 | 0d 20 20 20 74 68 72 6f |ncreases|. thro|
|00003770| 75 67 68 20 74 68 69 73 | 20 66 75 6e 63 74 69 6f |ugh this| functio|
|00003780| 6e 2e 0d 2a 29 0d 50 52 | 4f 43 45 44 55 52 45 20 |n..*).PR|OCEDURE |
|00003790| 54 72 61 63 6b 41 72 72 | 6f 77 73 28 6c 6f 63 3a |TrackArr|ows(loc:|
|000037a0| 20 50 6f 69 6e 74 29 3b | 0d 56 41 52 09 74 68 65 | Point);|.VAR.the|
|000037b0| 50 6f 69 6e 74 3a 09 50 | 6f 69 6e 74 3b 0d 09 69 |Point:.P|oint;..i|
|000037c0| 6e 55 70 2c 0d 09 69 6e | 44 6f 77 6e 3a 09 09 42 |nUp,..in|Down:..B|
|000037d0| 4f 4f 4c 45 41 4e 3b 0d | 09 6d 69 64 64 6c 65 3a |OOLEAN;.|.middle:|
|000037e0| 09 09 49 6e 74 65 67 65 | 72 3b 0d 09 74 6f 70 52 |..Intege|r;..topR|
|000037f0| 65 63 74 2c 0d 09 62 6f | 74 74 6f 6d 52 65 63 74 |ect,..bo|ttomRect|
|00003800| 3a 09 52 65 63 74 3b 0d | 09 75 70 52 67 6e 2c 20 |:.Rect;.|.upRgn, |
|00003810| 72 52 67 6e 2c 0d 09 64 | 6f 77 6e 52 67 6e 3a 09 |rRgn,..d|ownRgn:.|
|00003820| 52 67 6e 48 61 6e 64 6c | 65 3b 0d 09 70 6f 6c 79 |RgnHandl|e;..poly|
|00003830| 3a 09 09 50 6f 6c 79 48 | 61 6e 64 6c 65 3b 0d 09 |:..PolyH|andle;..|
|00003840| 72 61 74 65 3a 09 09 46 | 69 78 65 64 3b 0d 09 0d |rate:..F|ixed;...|
|00003850| 50 52 4f 43 45 44 55 52 | 45 20 44 72 61 77 52 61 |PROCEDUR|E DrawRa|
|00003860| 74 65 3b 0d 09 56 41 52 | 09 72 3a 09 52 65 63 74 |te;..VAR|.r:.Rect|
|00003870| 3b 0d 09 09 77 68 65 72 | 65 3a 20 50 6f 69 6e 74 |;...wher|e: Point|
|00003880| 3b 0d 09 09 73 3a 20 53 | 74 72 32 35 35 3b 0d 09 |;...s: S|tr255;..|
|00003890| 09 0d 09 42 45 47 49 4e | 0d 09 20 20 47 65 74 49 |...BEGIN|.. GetI|
|000038a0| 6e 64 52 65 63 74 28 72 | 52 43 54 49 44 2c 20 37 |ndRect(r|RCTID, 7|
|000038b0| 2c 20 72 29 3b 0d 09 20 | 20 4e 75 6d 54 6f 48 65 |, r);.. | NumToHe|
|000038c0| 78 28 72 61 74 65 2c 38 | 2c 20 73 29 3b 0d 09 20 |x(rate,8|, s);.. |
|000038d0| 20 4d 6f 76 65 54 6f 28 | 72 2e 72 69 67 68 74 20 | MoveTo(|r.right |
|000038e0| 2d 20 28 53 74 72 69 6e | 67 57 69 64 74 68 28 73 |- (Strin|gWidth(s|
|000038f0| 29 20 2b 20 32 29 2c 20 | 72 2e 62 6f 74 74 6f 6d |) + 2), |r.bottom|
|00003900| 20 2d 20 33 29 3b 0d 0d | 09 20 20 49 6e 73 65 74 | - 3);..|. Inset|
|00003910| 52 65 63 74 28 72 2c 31 | 2c 31 29 3b 0d 09 20 20 |Rect(r,1|,1);.. |
|00003920| 54 65 78 74 4d 6f 64 65 | 28 73 72 63 43 6f 70 79 |TextMode|(srcCopy|
|00003930| 29 3b 0d 09 20 20 44 72 | 61 77 53 74 72 69 6e 67 |);.. Dr|awString|
|00003940| 28 73 29 3b 0d 09 45 4e | 44 3b 0d 09 0d 42 45 47 |(s);..EN|D;...BEG|
|00003950| 49 4e 0d 09 75 70 52 67 | 6e 20 3a 3d 20 4e 65 77 |IN..upRg|n := New|
|00003960| 52 67 6e 3b 0d 09 64 6f | 77 6e 52 67 6e 20 3a 3d |Rgn;..do|wnRgn :=|
|00003970| 20 4e 65 77 52 67 6e 3b | 09 0d 09 72 52 67 6e 20 | NewRgn;|...rRgn |
|00003980| 3a 3d 20 4e 65 77 52 67 | 6e 3b 0d 09 72 61 74 65 |:= NewRg|n;..rate|
|00003990| 20 3a 3d 20 47 65 74 43 | 52 65 66 43 6f 6e 28 47 | := GetC|RefCon(G|
|000039a0| 65 74 43 6f 6e 74 72 6f | 6c 46 72 6f 6d 49 44 28 |etContro|lFromID(|
|000039b0| 31 33 32 2c 20 67 57 69 | 6e 64 29 29 3b 20 28 2a |132, gWi|nd)); (*|
|000039c0| 20 73 69 6e 63 65 20 77 | 65 20 64 65 63 6c 61 72 | since w|e declar|
|000039d0| 65 20 69 74 2c 20 75 73 | 65 20 69 74 20 2a 29 0d |e it, us|e it *).|
|000039e0| 09 0d 09 28 2a 20 72 61 | 74 68 65 72 20 75 67 6c |...(* ra|ther ugl|
|000039f0| 79 20 77 61 79 20 74 6f | 20 67 65 74 20 74 68 65 |y way to| get the|
|00003a00| 20 63 6f 72 72 65 63 74 | 20 73 68 61 70 65 20 66 | correct| shape f|
|00003a10| 6f 72 20 74 68 65 20 61 | 72 72 6f 77 73 2c 20 69 |or the a|rrows, i|
|00003a20| 74 20 77 6f 72 6b 73 20 | 74 68 6f 75 67 68 21 20 |t works |though! |
|00003a30| 2a 29 0d 09 74 6f 70 52 | 65 63 74 20 3a 3d 20 67 |*)..topR|ect := g|
|00003a40| 41 72 72 6f 77 73 5e 5e | 2e 70 69 63 46 72 61 6d |Arrows^^|.picFram|
|00003a50| 65 3b 0d 09 4f 66 66 73 | 65 74 52 65 63 74 28 74 |e;..Offs|etRect(t|
|00003a60| 6f 70 52 65 63 74 2c 2d | 31 2c 2d 31 29 3b 0d 09 |opRect,-|1,-1);..|
|00003a70| 57 49 54 48 20 74 6f 70 | 52 65 63 74 20 44 4f 0d |WITH top|Rect DO.|
|00003a80| 09 20 20 42 45 47 49 4e | 0d 09 20 20 4f 70 65 6e |. BEGIN|.. Open|
|00003a90| 52 67 6e 3b 0d 09 20 20 | 20 20 4d 6f 76 65 54 6f |Rgn;.. | MoveTo|
|00003aa0| 28 6c 65 66 74 2b 33 2c | 74 6f 70 2b 32 29 3b 0d |(left+3,|top+2);.|
|00003ab0| 09 09 4c 69 6e 65 54 6f | 28 72 69 67 68 74 2d 32 |..LineTo|(right-2|
|00003ac0| 2c 74 6f 70 2b 32 29 3b | 20 0d 09 09 4c 69 6e 65 |,top+2);| ...Line|
|00003ad0| 54 6f 28 72 69 67 68 74 | 2c 20 74 6f 70 2b 34 29 |To(right|, top+4)|
|00003ae0| 3b 20 20 0d 09 09 4c 69 | 6e 65 54 6f 28 72 69 67 |; ...Li|neTo(rig|
|00003af0| 68 74 2c 20 62 6f 74 74 | 6f 6d 2d 32 29 3b 0d 09 |ht, bott|om-2);..|
|00003b00| 09 4c 69 6e 65 54 6f 28 | 72 69 67 68 74 2d 32 2c |.LineTo(|right-2,|
|00003b10| 62 6f 74 74 6f 6d 29 3b | 0d 09 09 4c 69 6e 65 54 |bottom);|...LineT|
|00003b20| 6f 28 6c 65 66 74 2b 33 | 2c 62 6f 74 74 6f 6d 29 |o(left+3|,bottom)|
|00003b30| 3b 0d 09 09 4c 69 6e 65 | 54 6f 28 6c 65 66 74 2b |;...Line|To(left+|
|00003b40| 32 2c 62 6f 74 74 6f 6d | 2d 31 29 3b 0d 09 09 4c |2,bottom|-1);...L|
|00003b50| 69 6e 65 54 6f 28 6c 65 | 66 74 2b 32 2c 74 6f 70 |ineTo(le|ft+2,top|
|00003b60| 2b 34 29 3b 0d 09 20 20 | 20 20 4c 69 6e 65 54 6f |+4);.. | LineTo|
|00003b70| 28 6c 65 66 74 2b 33 2c | 74 6f 70 2b 32 29 3b 0d |(left+3,|top+2);.|
|00003b80| 09 20 20 43 6c 6f 73 65 | 52 67 6e 28 72 52 67 6e |. Close|Rgn(rRgn|
|00003b90| 29 3b 0d 09 20 20 45 4e | 44 3b 0d 09 20 20 0d 09 |);.. EN|D;.. ..|
|00003ba0| 69 6e 55 70 3a 3d 20 46 | 41 4c 53 45 3b 0d 09 69 |inUp:= F|ALSE;..i|
|00003bb0| 6e 44 6f 77 6e 3a 3d 46 | 41 4c 53 45 3b 0d 20 20 |nDown:=F|ALSE;. |
|00003bc0| 20 20 6d 69 64 64 6c 65 | 20 3a 3d 20 28 67 41 72 | middle| := (gAr|
|00003bd0| 72 6f 77 73 5e 5e 2e 70 | 69 63 46 72 61 6d 65 2e |rows^^.p|icFrame.|
|00003be0| 62 6f 74 74 6f 6d 2d 67 | 41 72 72 6f 77 73 5e 5e |bottom-g|Arrows^^|
|00003bf0| 2e 70 69 63 46 72 61 6d | 65 2e 74 6f 70 29 20 44 |.picFram|e.top) D|
|00003c00| 49 56 20 32 3b 0d 0d 09 | 74 6f 70 52 65 63 74 20 |IV 2;...|topRect |
|00003c10| 3a 3d 20 67 41 72 72 6f | 77 73 5e 5e 2e 70 69 63 |:= gArro|ws^^.pic|
|00003c20| 46 72 61 6d 65 3b 0d 09 | 74 6f 70 52 65 63 74 2e |Frame;..|topRect.|
|00003c30| 62 6f 74 74 6f 6d 20 3a | 3d 20 74 6f 70 52 65 63 |bottom :|= topRec|
|00003c40| 74 2e 62 6f 74 74 6f 6d | 20 2d 20 6d 69 64 64 6c |t.bottom| - middl|
|00003c50| 65 3b 0d 09 62 6f 74 74 | 6f 6d 52 65 63 74 20 3a |e;..bott|omRect :|
|00003c60| 3d 20 67 41 72 72 6f 77 | 73 5e 5e 2e 70 69 63 46 |= gArrow|s^^.picF|
|00003c70| 72 61 6d 65 3b 0d 09 62 | 6f 74 74 6f 6d 52 65 63 |rame;..b|ottomRec|
|00003c80| 74 2e 74 6f 70 20 3a 3d | 20 62 6f 74 74 6f 6d 52 |t.top :=| bottomR|
|00003c90| 65 63 74 2e 74 6f 70 20 | 2b 20 6d 69 64 64 6c 65 |ect.top |+ middle|
|00003ca0| 3b 0d 0d 09 6d 69 64 64 | 6c 65 20 3a 3d 20 62 6f |;...midd|le := bo|
|00003cb0| 74 74 6f 6d 52 65 63 74 | 2e 74 6f 70 3b 0d 09 52 |ttomRect|.top;..R|
|00003cc0| 65 63 74 52 67 6e 28 75 | 70 52 67 6e 2c 20 74 6f |ectRgn(u|pRgn, to|
|00003cd0| 70 52 65 63 74 29 3b 0d | 09 53 65 63 74 52 67 6e |pRect);.|.SectRgn|
|00003ce0| 28 75 70 52 67 6e 2c 20 | 72 52 67 6e 2c 20 75 70 |(upRgn, |rRgn, up|
|00003cf0| 52 67 6e 29 3b 0d 09 52 | 65 63 74 52 67 6e 28 64 |Rgn);..R|ectRgn(d|
|00003d00| 6f 77 6e 52 67 6e 2c 20 | 62 6f 74 74 6f 6d 52 65 |ownRgn, |bottomRe|
|00003d10| 63 74 29 3b 0d 09 53 65 | 63 74 52 67 6e 28 64 6f |ct);..Se|ctRgn(do|
|00003d20| 77 6e 52 67 6e 2c 20 72 | 52 67 6e 2c 20 64 6f 77 |wnRgn, r|Rgn, dow|
|00003d30| 6e 52 67 6e 29 3b 0d 09 | 0d 09 52 45 50 45 41 54 |nRgn);..|..REPEAT|
|00003d40| 0d 09 20 20 42 45 47 49 | 4e 0d 09 09 47 65 74 4d |.. BEGI|N...GetM|
|00003d50| 6f 75 73 65 28 74 68 65 | 50 6f 69 6e 74 29 3b 0d |ouse(the|Point);.|
|00003d60| 09 09 49 46 20 50 74 49 | 6e 52 65 63 74 28 74 68 |..IF PtI|nRect(th|
|00003d70| 65 50 6f 69 6e 74 2c 20 | 67 41 72 72 6f 77 73 5e |ePoint, |gArrows^|
|00003d80| 5e 2e 70 69 63 46 72 61 | 6d 65 29 20 54 48 45 4e |^.picFra|me) THEN|
|00003d90| 0d 09 09 20 20 42 45 47 | 49 4e 0d 09 09 20 20 20 |... BEG|IN... |
|00003da0| 20 49 46 20 74 68 65 50 | 6f 69 6e 74 2e 76 20 3c | IF theP|oint.v <|
|00003db0| 20 6d 69 64 64 6c 65 20 | 54 48 45 4e 20 28 2a 20 | middle |THEN (* |
|00003dc0| 6d 6f 75 73 65 20 6f 6e | 20 74 6f 70 20 70 61 72 |mouse on| top par|
|00003dd0| 74 20 2a 29 0d 09 09 09 | 20 20 42 45 47 49 4e 0d |t *)....| BEGIN.|
|00003de0| 09 09 09 20 20 20 20 72 | 61 74 65 20 3a 3d 20 72 |... r|ate := r|
|00003df0| 61 74 65 20 2b 20 24 30 | 30 30 30 30 30 31 30 3b |ate + $0|0000010;|
|00003e00| 0d 09 09 09 09 44 72 61 | 77 52 61 74 65 3b 0d 09 |.....Dra|wRate;..|
|00003e10| 09 09 20 20 20 20 49 46 | 20 69 6e 44 6f 77 6e 20 |.. IF| inDown |
|00003e20| 54 48 45 4e 0d 09 09 09 | 09 20 20 42 45 47 49 4e |THEN....|. BEGIN|
|00003e30| 0d 09 09 09 09 20 20 20 | 20 49 6e 76 65 72 74 52 |..... | InvertR|
|00003e40| 67 6e 28 64 6f 77 6e 52 | 67 6e 29 3b 20 28 2a 20 |gn(downR|gn); (* |
|00003e50| 75 6e 20 68 69 6c 69 74 | 65 20 64 6f 77 6e 20 61 |un hilit|e down a|
|00003e60| 72 72 6f 77 20 2a 29 0d | 09 09 09 09 09 49 6e 76 |rrow *).|.....Inv|
|00003e70| 65 72 74 52 67 6e 28 75 | 70 52 67 6e 29 3b 09 28 |ertRgn(u|pRgn);.(|
|00003e80| 2a 20 68 69 6c 69 74 65 | 20 75 70 09 09 09 2a 29 |* hilite| up...*)|
|00003e90| 0d 09 09 09 09 09 69 6e | 44 6f 77 6e 20 3a 3d 20 |......in|Down := |
|00003ea0| 46 41 4c 53 45 3b 0d 09 | 09 09 09 20 20 45 4e 44 |FALSE;..|... END|
|00003eb0| 0d 09 09 09 09 45 4c 53 | 45 09 09 28 2a 20 69 6e |.....ELS|E..(* in|
|00003ec0| 20 75 70 20 61 72 72 6f | 77 20 61 67 61 69 6e 20 | up arro|w again |
|00003ed0| 2a 29 0d 09 09 09 09 20 | 20 42 45 47 49 4e 0d 09 |*)..... | BEGIN..|
|00003ee0| 09 09 09 20 20 20 20 49 | 46 20 4e 4f 54 20 69 6e |... I|F NOT in|
|00003ef0| 55 70 20 54 48 45 4e 20 | 28 2a 20 66 69 72 73 74 |Up THEN |(* first|
|00003f00| 20 74 69 6d 65 20 68 69 | 6c 69 74 65 20 74 68 65 | time hi|lite the|
|00003f10| 20 61 72 72 6f 77 20 2a | 29 0d 09 09 09 09 09 20 | arrow *|)...... |
|00003f20| 20 49 6e 76 65 72 74 52 | 67 6e 28 75 70 52 67 6e | InvertR|gn(upRgn|
|00003f30| 29 3b 09 28 2a 20 68 69 | 6c 69 74 65 20 75 70 09 |);.(* hi|lite up.|
|00003f40| 09 09 2a 29 0d 09 09 09 | 09 20 20 45 4e 44 3b 0d |..*)....|. END;.|
|00003f50| 09 09 09 09 69 6e 55 70 | 20 3a 3d 20 54 52 55 45 |....inUp| := TRUE|
|00003f60| 0d 09 09 20 20 20 20 20 | 20 45 4e 44 0d 09 09 09 |... | END....|
|00003f70| 45 4c 53 45 09 28 2a 20 | 63 75 72 73 6f 72 20 69 |ELSE.(* |cursor i|
|00003f80| 73 20 6f 6e 20 74 6f 70 | 20 6f 66 20 64 6f 77 6e |s on top| of down|
|00003f90| 20 61 72 72 6f 77 20 2a | 29 0d 09 09 09 20 20 42 | arrow *|).... B|
|00003fa0| 45 47 49 4e 0d 09 09 09 | 20 20 20 20 72 61 74 65 |EGIN....| rate|
|00003fb0| 20 3a 3d 20 72 61 74 65 | 20 2b 20 24 46 46 46 46 | := rate| + $FFFF|
|00003fc0| 46 46 46 30 3b 0d 09 09 | 09 09 44 72 61 77 52 61 |FFF0;...|..DrawRa|
|00003fd0| 74 65 3b 0d 09 09 09 20 | 20 20 20 49 46 20 69 6e |te;.... | IF in|
|00003fe0| 55 70 20 54 48 45 4e 0d | 09 09 09 09 20 20 42 45 |Up THEN.|.... BE|
|00003ff0| 47 49 4e 0d 09 09 09 09 | 20 20 20 20 49 6e 76 65 |GIN.....| Inve|
|00004000| 72 74 52 67 6e 28 64 6f | 77 6e 52 67 6e 29 3b 20 |rtRgn(do|wnRgn); |
|00004010| 28 2a 20 75 6e 20 68 69 | 6c 69 74 65 20 64 6f 77 |(* un hi|lite dow|
|00004020| 6e 20 61 72 72 6f 77 20 | 2a 29 0d 09 09 09 09 09 |n arrow |*)......|
|00004030| 49 6e 76 65 72 74 52 67 | 6e 28 75 70 52 67 6e 29 |InvertRg|n(upRgn)|
|00004040| 3b 09 28 2a 20 68 69 6c | 69 74 65 20 75 70 09 09 |;.(* hil|ite up..|
|00004050| 09 2a 29 0d 09 09 09 09 | 09 69 6e 55 70 20 3a 3d |.*).....|.inUp :=|
|00004060| 20 46 41 4c 53 45 3b 0d | 09 09 09 09 20 20 45 4e | FALSE;.|.... EN|
|00004070| 44 0d 09 09 09 09 45 4c | 53 45 09 09 28 2a 20 69 |D.....EL|SE..(* i|
|00004080| 6e 20 75 70 20 61 72 72 | 6f 77 20 61 67 61 69 6e |n up arr|ow again|
|00004090| 20 2a 29 0d 09 09 09 09 | 20 20 42 45 47 49 4e 0d | *).....| BEGIN.|
|000040a0| 09 09 09 09 20 20 20 20 | 49 46 20 4e 4f 54 20 69 |.... |IF NOT i|
|000040b0| 6e 44 6f 77 6e 20 54 48 | 45 4e 0d 09 09 09 09 09 |nDown TH|EN......|
|000040c0| 20 20 49 6e 76 65 72 74 | 52 67 6e 28 64 6f 77 6e | Invert|Rgn(down|
|000040d0| 52 67 6e 29 3b 0d 09 09 | 09 09 20 20 45 4e 44 3b |Rgn);...|.. END;|
|000040e0| 0d 09 09 09 09 69 6e 44 | 6f 77 6e 20 3a 3d 20 54 |.....inD|own := T|
|000040f0| 52 55 45 0d 09 09 09 20 | 20 45 4e 44 0d 09 09 20 |RUE.... | END... |
|00004100| 20 45 4e 44 0d 09 09 45 | 4c 53 45 0d 09 09 20 20 | END...E|LSE... |
|00004110| 42 45 47 49 4e 0d 09 09 | 20 20 20 20 49 46 20 69 |BEGIN...| IF i|
|00004120| 6e 55 70 20 54 48 45 4e | 0d 09 09 09 20 20 42 45 |nUp THEN|.... BE|
|00004130| 47 49 4e 0d 09 09 09 20 | 20 20 20 69 6e 55 70 20 |GIN.... | inUp |
|00004140| 3a 3d 20 46 41 4c 53 45 | 3b 0d 09 09 09 09 49 6e |:= FALSE|;.....In|
|00004150| 76 65 72 74 52 67 6e 28 | 75 70 52 67 6e 29 3b 0d |vertRgn(|upRgn);.|
|00004160| 09 09 09 20 20 45 4e 44 | 3b 0d 09 09 20 20 20 20 |... END|;... |
|00004170| 49 46 20 69 6e 44 6f 77 | 6e 20 54 48 45 4e 0d 09 |IF inDow|n THEN..|
|00004180| 09 09 20 20 42 45 47 49 | 4e 0d 09 09 09 20 20 20 |.. BEGI|N.... |
|00004190| 20 69 6e 44 6f 77 6e 20 | 3a 3d 20 46 41 4c 53 45 | inDown |:= FALSE|
|000041a0| 3b 0d 09 09 09 09 49 6e | 76 65 72 74 52 67 6e 28 |;.....In|vertRgn(|
|000041b0| 64 6f 77 6e 52 67 6e 29 | 3b 0d 09 09 09 20 20 45 |downRgn)|;.... E|
|000041c0| 4e 44 3b 0d 09 09 20 20 | 45 4e 44 3b 0d 09 20 20 |ND;... |END;.. |
|000041d0| 45 4e 44 0d 09 55 4e 54 | 49 4c 20 4e 4f 54 20 53 |END..UNT|IL NOT S|
|000041e0| 74 69 6c 6c 44 6f 77 6e | 3b 0d 0d 09 49 46 20 69 |tillDown|;...IF i|
|000041f0| 6e 55 70 20 54 48 45 4e | 20 28 2a 20 63 6c 65 61 |nUp THEN| (* clea|
|00004200| 6e 20 74 68 69 6e 67 73 | 20 75 70 20 62 65 66 6f |n things| up befo|
|00004210| 72 65 20 6c 65 61 76 69 | 6e 67 20 2a 29 0d 09 20 |re leavi|ng *).. |
|00004220| 20 42 45 47 49 4e 0d 09 | 09 49 6e 76 65 72 74 52 | BEGIN..|.InvertR|
|00004230| 67 6e 28 75 70 52 67 6e | 29 3b 0d 09 20 20 45 4e |gn(upRgn|);.. EN|
|00004240| 44 3b 0d 09 49 46 20 69 | 6e 44 6f 77 6e 20 54 48 |D;..IF i|nDown TH|
|00004250| 45 4e 0d 09 20 20 42 45 | 47 49 4e 0d 09 09 49 6e |EN.. BE|GIN...In|
|00004260| 76 65 72 74 52 67 6e 28 | 64 6f 77 6e 52 67 6e 29 |vertRgn(|downRgn)|
|00004270| 3b 0d 09 20 20 45 4e 44 | 3b 0d 0d 09 53 65 74 52 |;.. END|;...SetR|
|00004280| 65 66 43 6f 6e 52 61 74 | 65 28 72 61 74 65 29 3b |efConRat|e(rate);|
|00004290| 20 28 2a 20 69 66 20 69 | 74 20 68 61 73 20 63 68 | (* if i|t has ch|
|000042a0| 61 67 65 64 20 77 69 6c | 6c 20 73 74 6f 72 65 20 |aged wil|l store |
|000042b0| 6e 65 77 20 76 61 6c 75 | 65 20 2a 29 0d 0d 09 44 |new valu|e *)...D|
|000042c0| 69 73 70 6f 73 65 52 67 | 6e 28 75 70 52 67 6e 29 |isposeRg|n(upRgn)|
|000042d0| 3b 0d 09 44 69 73 70 6f | 73 65 52 67 6e 28 64 6f |;..Dispo|seRgn(do|
|000042e0| 77 6e 52 67 6e 29 3b 09 | 0d 09 44 69 73 70 6f 73 |wnRgn);.|..Dispos|
|000042f0| 65 52 67 6e 28 72 52 67 | 6e 29 3b 0d 09 54 65 78 |eRgn(rRg|n);..Tex|
|00004300| 74 4d 6f 64 65 28 73 72 | 63 4f 72 29 3b 0d 45 4e |tMode(sr|cOr);.EN|
|00004310| 44 3b 0d 0d 0d 50 52 4f | 43 45 44 55 52 45 20 44 |D;...PRO|CEDURE D|
|00004320| 6f 43 6f 6e 74 65 6e 74 | 28 56 41 52 20 77 68 65 |oContent|(VAR whe|
|00004330| 72 65 3a 20 50 6f 69 6e | 74 3b 20 77 68 61 74 3a |re: Poin|t; what:|
|00004340| 20 57 69 6e 64 6f 77 50 | 74 72 29 3b 0d 56 41 52 | WindowP|tr);.VAR|
|00004350| 09 09 09 77 68 69 63 68 | 43 6f 6e 74 72 6f 6c 3a |...which|Control:|
|00004360| 20 43 6f 6e 74 72 6f 6c | 48 61 6e 64 6c 65 3b 0d | Control|Handle;.|
|00004370| 09 09 09 63 6f 6e 74 72 | 6f 6c 49 44 3a 20 49 6e |...contr|olID: In|
|00004380| 74 65 67 65 72 3b 0d 0d | 42 45 47 49 4e 0d 09 47 |teger;..|BEGIN..G|
|00004390| 6c 6f 62 61 6c 54 6f 4c | 6f 63 61 6c 28 77 68 65 |lobalToL|ocal(whe|
|000043a0| 72 65 29 3b 0d 09 49 46 | 20 28 20 46 69 6e 64 43 |re);..IF| ( FindC|
|000043b0| 6f 6e 74 72 6f 6c 28 77 | 68 65 72 65 2c 20 77 68 |ontrol(w|here, wh|
|000043c0| 61 74 2c 20 77 68 69 63 | 68 43 6f 6e 74 72 6f 6c |at, whic|hControl|
|000043d0| 29 20 3c 3e 20 30 20 29 | 20 54 48 45 4e 0d 09 20 |) <> 0 )| THEN.. |
|000043e0| 20 42 45 47 49 4e 0d 09 | 09 63 6f 6e 74 72 6f 6c | BEGIN..|.control|
|000043f0| 49 44 20 3a 3d 20 47 65 | 74 43 6f 6e 74 72 6f 6c |ID := Ge|tControl|
|00004400| 49 44 28 77 68 69 63 68 | 43 6f 6e 74 72 6f 6c 2c |ID(which|Control,|
|00004410| 20 77 68 61 74 29 3b 0d | 09 20 20 20 20 49 46 20 | what);.|. IF |
|00004420| 28 20 54 72 61 63 6b 43 | 6f 6e 74 72 6f 6c 28 77 |( TrackC|ontrol(w|
|00004430| 68 69 63 68 43 6f 6e 74 | 72 6f 6c 2c 20 77 68 65 |hichCont|rol, whe|
|00004440| 72 65 2c 20 50 72 6f 63 | 50 74 72 28 2d 31 29 29 |re, Proc|Ptr(-1))|
|00004450| 20 3c 3e 20 30 29 20 54 | 48 45 4e 0d 09 09 20 20 | <> 0) T|HEN... |
|00004460| 42 45 47 49 4e 0d 09 09 | 20 20 20 20 43 41 53 45 |BEGIN...| CASE|
|00004470| 20 63 6f 6e 74 72 6f 6c | 49 44 20 4f 46 0d 09 09 | control|ID OF...|
|00004480| 09 31 32 38 3a 3b 0d 09 | 09 09 31 32 39 3a 53 65 |.128:;..|..129:Se|
|00004490| 74 4c 6f 6f 70 28 20 63 | 6f 6e 74 72 6f 6c 49 44 |tLoop( c|ontrolID|
|000044a0| 29 3b 0d 09 09 09 31 33 | 30 3a 53 65 74 4c 6f 6f |);....13|0:SetLoo|
|000044b0| 70 28 20 63 6f 6e 74 72 | 6f 6c 49 44 29 3b 0d 09 |p( contr|olID);..|
|000044c0| 09 09 31 33 31 3a 53 65 | 74 4c 6f 6f 70 28 20 63 |..131:Se|tLoop( c|
|000044d0| 6f 6e 74 72 6f 6c 49 44 | 29 3b 0d 09 09 09 31 33 |ontrolID|);....13|
|000044e0| 32 3a 53 65 74 50 72 65 | 66 65 72 72 65 64 52 61 |2:SetPre|ferredRa|
|000044f0| 74 65 28 20 63 6f 6e 74 | 72 6f 6c 49 44 29 3b 0d |te( cont|rolID);.|
|00004500| 09 09 09 31 33 33 3a 52 | 65 73 65 74 50 72 65 66 |...133:R|esetPref|
|00004510| 65 72 72 65 64 52 61 74 | 65 28 20 63 6f 6e 74 72 |erredRat|e( contr|
|00004520| 6f 6c 49 44 29 3b 0d 09 | 09 20 20 20 20 4f 54 48 |olID);..|. OTH|
|00004530| 45 52 57 49 53 45 0d 09 | 09 09 44 65 62 75 67 53 |ERWISE..|..DebugS|
|00004540| 74 72 28 27 42 75 6d 6d | 65 72 3a 20 63 6f 75 6c |tr('Bumm|er: coul|
|00004550| 64 20 6e 6f 74 20 66 69 | 6e 64 20 74 68 65 20 63 |d not fi|nd the c|
|00004560| 6f 6e 74 72 6f 6c 27 29 | 3b 0d 09 09 20 20 20 20 |ontrol')|;... |
|00004570| 45 4e 44 0d 09 09 20 20 | 45 4e 44 0d 09 20 20 45 |END... |END.. E|
|00004580| 4e 44 0d 09 45 4c 53 45 | 0d 09 20 20 49 46 20 49 |ND..ELSE|.. IF I|
|00004590| 6e 41 72 72 6f 77 73 28 | 77 68 65 72 65 29 20 54 |nArrows(|where) T|
|000045a0| 48 45 4e 0d 09 20 20 20 | 20 54 72 61 63 6b 41 72 |HEN.. | TrackAr|
|000045b0| 72 6f 77 73 28 77 68 65 | 72 65 29 3b 0d 45 4e 44 |rows(whe|re);.END|
|000045c0| 3b 0d 0d 50 52 4f 43 45 | 44 55 52 45 20 44 6f 4d |;..PROCE|DURE DoM|
|000045d0| 6f 75 73 65 44 6f 77 6e | 28 74 68 65 45 76 65 6e |ouseDown|(theEven|
|000045e0| 74 3a 45 76 65 6e 74 52 | 65 63 6f 72 64 29 3b 0d |t:EventR|ecord);.|
|000045f0| 7b 20 0d 20 20 20 20 70 | 75 72 70 6f 73 65 20 20 |{ . p|urpose |
|00004600| 20 20 20 20 20 20 20 69 | 64 65 6e 74 69 66 79 20 | i|dentify |
|00004610| 77 68 65 72 65 20 6d 6f | 75 73 65 20 77 61 73 20 |where mo|use was |
|00004620| 63 6c 69 63 6b 65 64 20 | 61 6e 64 20 68 61 6e 64 |clicked |and hand|
|00004630| 6c 65 20 69 74 0d 7d 0d | 56 41 52 0d 20 20 4c 6f |le it.}.|VAR. Lo|
|00004640| 63 61 74 69 6f 6e 20 20 | 20 20 20 20 3a 20 49 6e |cation | : In|
|00004650| 74 65 67 65 72 3b 0d 20 | 20 74 68 65 57 69 6e 64 |teger;. | theWind|
|00004660| 6f 77 20 20 20 20 20 3a | 09 57 69 6e 64 6f 77 50 |ow :|.WindowP|
|00004670| 74 72 3b 0d 20 20 4d 4c | 6f 63 20 20 20 20 20 20 |tr;. ML|oc |
|00004680| 20 20 20 20 3a 09 50 6f | 69 6e 74 3b 0d 20 20 57 | :.Po|int;. W|
|00004690| 4c 6f 63 20 20 20 20 20 | 20 20 20 20 20 3a 09 49 |Loc | :.I|
|000046a0| 6e 74 65 67 65 72 3b 0d | 20 20 20 0d 42 45 47 49 |nteger;.| .BEGI|
|000046b0| 4e 0d 20 20 4d 4c 6f 63 | 20 20 3a 3d 20 74 68 65 |N. MLoc| := the|
|000046c0| 45 76 65 6e 74 2e 57 68 | 65 72 65 3b 20 20 20 20 |Event.Wh|ere; |
|000046d0| 20 20 20 20 20 20 20 20 | 20 20 7b 20 67 65 74 20 | | { get |
|000046e0| 6d 6f 75 73 65 20 70 6f | 73 69 74 69 6f 6e 20 20 |mouse po|sition |
|000046f0| 20 20 20 20 20 20 20 20 | 20 20 7d 0d 20 20 57 4c | | }. WL|
|00004700| 6f 63 20 3a 3d 20 46 69 | 6e 64 57 69 6e 64 6f 77 |oc := Fi|ndWindow|
|00004710| 28 4d 4c 6f 63 2c 74 68 | 65 57 69 6e 64 6f 77 29 |(MLoc,th|eWindow)|
|00004720| 3b 20 20 20 7b 20 67 65 | 74 20 77 69 6e 64 6f 77 |; { ge|t window|
|00004730| 2c 20 6c 6f 63 20 69 6e | 20 77 69 6e 64 6f 77 20 |, loc in| window |
|00004740| 20 20 20 20 7d 0d 20 20 | 43 41 53 45 20 57 4c 6f | }. |CASE WLo|
|00004750| 63 20 4f 46 20 20 20 20 | 20 20 20 20 20 20 20 20 |c OF | |
|00004760| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7b 20 | | { |
|00004770| 68 61 6e 64 6c 65 20 77 | 69 6e 64 6f 77 20 6c 6f |handle w|indow lo|
|00004780| 63 61 74 69 6f 6e 73 20 | 20 20 20 20 20 20 7d 0d |cations | }.|
|00004790| 20 20 20 20 49 6e 47 6f | 41 77 61 79 20 20 20 20 | InGo|Away |
|000047a0| 3a 20 48 61 6e 64 6c 65 | 47 6f 41 77 61 79 28 74 |: Handle|GoAway(t|
|000047b0| 68 65 57 69 6e 64 6f 77 | 2c 4d 4c 6f 63 29 3b 20 |heWindow|,MLoc); |
|000047c0| 20 20 20 20 7b 20 69 6e | 20 74 68 65 20 67 6f 20 | { in| the go |
|000047d0| 61 77 61 79 20 62 6f 78 | 7d 0d 09 49 6e 43 6f 6e |away box|}..InCon|
|000047e0| 74 65 6e 74 3a 09 20 20 | 44 6f 43 6f 6e 74 65 6e |tent:. |DoConten|
|000047f0| 74 28 4d 4c 6f 63 2c 20 | 74 68 65 57 69 6e 64 6f |t(MLoc, |theWindo|
|00004800| 77 29 3b 0d 09 4f 54 48 | 45 52 57 49 53 45 09 20 |w);..OTH|ERWISE. |
|00004810| 3b 0d 20 20 45 4e 44 3b | 0d 45 4e 44 3b 20 7b 20 |;. END;|.END; { |
|00004820| 6f 66 20 70 72 6f 63 20 | 44 6f 4d 6f 75 73 65 44 |of proc |DoMouseD|
|00004830| 6f 77 6e 20 7d 0d 0d 50 | 52 4f 43 45 44 55 52 45 |own }..P|ROCEDURE|
|00004840| 20 55 70 64 61 74 65 53 | 74 75 66 66 28 77 68 61 | UpdateS|tuff(wha|
|00004850| 74 3a 20 57 69 6e 64 6f | 77 50 74 72 29 3b 0d 0d |t: Windo|wPtr);..|
|00004860| 42 45 47 49 4e 0d 09 42 | 65 67 69 6e 55 70 64 61 |BEGIN..B|eginUpda|
|00004870| 74 65 28 77 68 61 74 29 | 3b 0d 09 20 20 53 65 74 |te(what)|;.. Set|
|00004880| 50 6f 72 74 28 77 68 61 | 74 29 3b 0d 09 20 20 44 |Port(wha|t);.. D|
|00004890| 72 61 77 50 69 63 74 75 | 72 65 28 67 41 72 72 6f |rawPictu|re(gArro|
|000048a0| 77 73 2c 20 67 41 72 72 | 6f 77 73 5e 5e 2e 70 69 |ws, gArr|ows^^.pi|
|000048b0| 63 46 72 61 6d 65 29 3b | 0d 09 20 20 44 72 61 77 |cFrame);|.. Draw|
|000048c0| 43 6f 6e 74 72 6f 6c 73 | 28 77 68 61 74 29 3b 0d |Controls|(what);.|
|000048d0| 09 20 20 44 72 61 77 53 | 68 75 74 74 6c 65 56 61 |. DrawS|huttleVa|
|000048e0| 6c 75 65 28 54 52 55 45 | 29 3b 20 09 09 09 09 09 |lue(TRUE|); .....|
|000048f0| 0d 09 20 20 44 72 61 77 | 43 6f 6e 74 65 6e 74 73 |.. Draw|Contents|
|00004900| 3b 0d 09 45 6e 64 55 70 | 64 61 74 65 28 77 68 61 |;..EndUp|date(wha|
|00004910| 74 29 3b 0d 45 4e 44 3b | 0d 0d 50 52 4f 43 45 44 |t);.END;|..PROCED|
|00004920| 55 52 45 20 48 61 6e 64 | 6c 65 45 76 65 6e 74 28 |URE Hand|leEvent(|
|00004930| 74 68 65 45 76 65 6e 74 | 20 3a 20 45 76 65 6e 74 |theEvent| : Event|
|00004940| 52 65 63 6f 72 64 29 3b | 0d 7b 20 0d 20 20 20 20 |Record);|.{ . |
|00004950| 70 75 72 70 6f 73 65 20 | 20 20 20 20 20 20 20 20 |purpose | |
|00004960| 64 65 63 6f 64 65 73 20 | 65 76 65 6e 74 20 61 6e |decodes |event an|
|00004970| 64 20 68 61 6e 64 6c 65 | 73 20 69 74 0d 7d 0d 42 |d handle|s it.}.B|
|00004980| 45 47 49 4e 0d 20 20 43 | 41 53 45 20 74 68 65 45 |EGIN. C|ASE theE|
|00004990| 76 65 6e 74 2e 57 68 61 | 74 20 4f 46 0d 20 20 20 |vent.Wha|t OF. |
|000049a0| 20 6d 6f 75 73 65 44 6f | 77 6e 09 20 20 20 3a 20 | mouseDo|wn. : |
|000049b0| 44 6f 4d 6f 75 73 65 44 | 6f 77 6e 28 74 68 65 45 |DoMouseD|own(theE|
|000049c0| 76 65 6e 74 29 3b 20 20 | 20 20 20 20 7b 20 6d 6f |vent); | { mo|
|000049d0| 75 73 65 20 62 75 74 74 | 6f 6e 20 70 75 73 68 65 |use butt|on pushe|
|000049e0| 64 20 20 20 7d 0d 09 75 | 70 64 61 74 65 45 76 74 |d }..u|pdateEvt|
|000049f0| 3a 09 09 20 55 70 64 61 | 74 65 53 74 75 66 66 28 |:.. Upda|teStuff(|
|00004a00| 57 69 6e 64 6f 77 50 74 | 72 28 74 68 65 45 76 65 |WindowPt|r(theEve|
|00004a10| 6e 74 2e 6d 65 73 73 61 | 67 65 29 29 3b 0d 20 20 |nt.messa|ge));. |
|00004a20| 45 4e 44 0d 45 4e 44 3b | 20 7b 20 6f 66 20 70 72 |END.END;| { of pr|
|00004a30| 6f 63 20 48 61 6e 64 6c | 65 45 76 65 6e 74 20 7d |oc Handl|eEvent }|
|00004a40| 0d 0d 50 52 4f 43 45 44 | 55 52 45 20 49 6e 69 74 |..PROCED|URE Init|
|00004a50| 56 61 72 73 3b 0d 42 45 | 47 49 4e 0d 7b 20 49 6e |Vars;.BE|GIN.{ In|
|00004a60| 69 74 69 61 6c 69 7a 61 | 74 69 6f 6e 20 6f 66 20 |itializa|tion of |
|00004a70| 76 61 72 69 61 62 6c 65 | 73 20 75 73 65 64 20 66 |variable|s used f|
|00004a80| 6f 72 20 74 69 6d 65 20 | 62 61 73 65 20 73 61 6d |or time |base sam|
|00004a90| 70 6c 65 73 20 7d 0d 20 | 20 67 44 6f 6e 65 46 6c |ples }. | gDoneFl|
|00004aa0| 61 67 20 3a 3d 20 46 41 | 4c 53 45 3b 09 09 7b 20 |ag := FA|LSE;..{ |
|00004ab0| 74 6f 20 62 65 67 69 6e | 20 77 69 74 68 09 09 09 |to begin| with...|
|00004ac0| 09 09 09 7d 0d 20 20 67 | 4c 6f 6f 70 69 6e 67 20 |...}. g|Looping |
|00004ad0| 3a 3d 20 46 41 4c 53 45 | 3b 0d 45 4e 44 3b 0d 0d |:= FALSE|;.END;..|
|00004ae0| 46 55 4e 43 54 49 4f 4e | 20 49 6e 69 74 53 79 73 |FUNCTION| InitSys|
|00004af0| 74 65 6d 3a 20 4f 53 45 | 72 72 3b 0d 7b 20 0d 20 |tem: OSE|rr;.{ . |
|00004b00| 20 20 20 70 75 72 70 6f | 73 65 20 20 20 20 20 20 | purpo|se |
|00004b10| 20 20 20 69 6e 69 74 69 | 61 6c 69 7a 65 20 65 76 | initi|alize ev|
|00004b20| 65 72 79 74 68 69 6e 67 | 20 66 6f 72 20 74 68 65 |erything| for the|
|00004b30| 20 70 72 6f 67 72 61 6d | 0d 09 09 09 09 09 72 65 | program|......re|
|00004b40| 74 75 72 6e 73 20 61 6e | 20 65 72 72 6f 72 20 69 |turns an| error i|
|00004b50| 66 20 51 75 69 63 6b 54 | 49 6d 65 20 69 73 20 6e |f QuickT|Ime is n|
|00004b60| 6f 74 20 70 72 65 73 65 | 6e 74 20 6f 72 0d 09 09 |ot prese|nt or...|
|00004b70| 09 09 09 69 66 20 45 6e | 74 65 72 4d 6f 76 69 65 |...if En|terMovie|
|00004b80| 73 20 66 61 69 6c 65 64 | 2e 0d 7d 0d 56 41 52 0d |s failed|..}.VAR.|
|00004b90| 20 20 72 65 73 75 6c 74 | 3a 20 09 4f 53 45 72 72 | result|: .OSErr|
|00004ba0| 3b 0d 20 20 61 72 72 6f | 77 3a 09 50 69 63 48 61 |;. arro|w:.PicHa|
|00004bb0| 6e 64 6c 65 3b 0d 0d 46 | 55 4e 43 54 49 4f 4e 20 |ndle;..F|UNCTION |
|00004bc0| 47 65 74 47 65 73 74 61 | 6c 74 52 65 73 75 6c 74 |GetGesta|ltResult|
|00004bd0| 28 67 65 73 74 61 6c 74 | 53 65 6c 65 63 74 6f 72 |(gestalt|Selector|
|00004be0| 3a 20 4f 53 54 79 70 65 | 29 3a 49 6e 74 65 67 65 |: OSType|):Intege|
|00004bf0| 72 3b 0d 56 41 52 0d 20 | 20 72 65 73 75 6c 74 20 |r;.VAR. | result |
|00004c00| 3a 20 4c 4f 4e 47 49 4e | 54 3b 0d 20 20 0d 42 45 |: LONGIN|T;. .BE|
|00004c10| 47 49 4e 0d 20 20 49 46 | 20 47 65 73 74 61 6c 74 |GIN. IF| Gestalt|
|00004c20| 28 67 65 73 74 61 6c 74 | 53 65 6c 65 63 74 6f 72 |(gestalt|Selector|
|00004c30| 2c 20 72 65 73 75 6c 74 | 29 20 3d 20 6e 6f 45 72 |, result|) = noEr|
|00004c40| 72 20 54 48 45 4e 0d 20 | 20 20 20 47 65 74 47 65 |r THEN. | GetGe|
|00004c50| 73 74 61 6c 74 52 65 73 | 75 6c 74 20 3a 3d 20 72 |staltRes|ult := r|
|00004c60| 65 73 75 6c 74 0d 20 20 | 45 4c 53 45 0d 20 20 20 |esult. |ELSE. |
|00004c70| 20 47 65 74 47 65 73 74 | 61 6c 74 52 65 73 75 6c | GetGest|altResul|
|00004c80| 74 20 3a 3d 20 30 3b 0d | 45 4e 44 3b 0d 0d 42 45 |t := 0;.|END;..BE|
|00004c90| 47 49 4e 0d 0d 20 20 4d | 61 78 41 70 70 6c 5a 6f |GIN.. M|axApplZo|
|00004ca0| 6e 65 3b 0d 20 20 0d 20 | 20 7b 20 69 6e 69 74 69 |ne;. . | { initi|
|00004cb0| 61 6c 69 7a 65 20 61 6c | 6c 20 74 68 65 20 64 69 |alize al|l the di|
|00004cc0| 66 66 65 72 65 6e 74 20 | 6d 61 6e 61 67 65 72 73 |fferent |managers|
|00004cd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004ce0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7d | | }|
|00004cf0| 0d 20 20 49 6e 69 74 47 | 72 61 66 28 40 74 68 65 |. InitG|raf(@the|
|00004d00| 50 6f 72 74 29 3b 20 20 | 20 20 20 20 20 20 20 20 |Port); | |
|00004d10| 20 20 20 20 20 7b 20 63 | 72 65 61 74 65 20 61 20 | { c|reate a |
|00004d20| 67 72 61 66 70 6f 72 74 | 20 66 6f 72 20 74 68 65 |grafport| for the|
|00004d30| 20 73 63 72 65 65 6e 20 | 20 7d 0d 20 20 49 6e 69 | screen | }. Ini|
|00004d40| 74 46 6f 6e 74 73 3b 20 | 20 20 20 20 20 20 20 20 |tFonts; | |
|00004d50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7b | | {|
|00004d60| 20 73 74 61 72 74 20 75 | 70 20 74 68 65 20 66 6f | start u|p the fo|
|00004d70| 6e 74 20 6d 61 6e 61 67 | 65 72 20 20 20 20 20 20 |nt manag|er |
|00004d80| 20 20 20 7d 0d 20 20 49 | 6e 69 74 57 69 6e 64 6f | }. I|nitWindo|
|00004d90| 77 73 3b 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ws; | |
|00004da0| 20 20 20 20 20 20 20 20 | 20 7b 20 73 74 61 72 74 | | { start|
|00004db0| 20 75 70 20 74 68 65 20 | 77 69 6e 64 6f 77 20 6d | up the |window m|
|00004dc0| 61 6e 61 67 65 72 20 20 | 20 20 20 20 20 7d 0d 20 |anager | }. |
|00004dd0| 20 49 6e 69 74 4d 65 6e | 75 73 3b 20 20 20 20 20 | InitMen|us; |
|00004de0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004df0| 20 20 20 7b 20 73 74 61 | 72 74 20 75 70 20 74 68 | { sta|rt up th|
|00004e00| 65 20 6d 65 6e 75 20 6d | 61 6e 61 67 65 72 20 20 |e menu m|anager |
|00004e10| 20 20 20 20 20 20 20 7d | 0d 20 20 54 45 49 6e 69 | }|. TEIni|
|00004e20| 74 3b 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t; | |
|00004e30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 7b 20 73 | | { s|
|00004e40| 74 61 72 74 20 75 70 20 | 74 68 65 20 74 65 78 74 |tart up |the text|
|00004e50| 20 6d 61 6e 61 67 65 72 | 20 66 6f 72 20 44 41 73 | manager| for DAs|
|00004e60| 20 7d 0d 20 20 49 6e 69 | 74 44 69 61 6c 6f 67 73 | }. Ini|tDialogs|
|00004e70| 28 4e 49 4c 29 3b 20 20 | 20 20 20 20 20 20 20 20 |(NIL); | |
|00004e80| 20 20 20 20 20 20 20 7b | 20 73 74 61 72 74 20 75 | {| start u|
|00004e90| 70 20 74 68 65 20 64 69 | 61 6c 6f 67 20 6d 61 6e |p the di|alog man|
|00004ea0| 61 67 65 72 20 20 20 20 | 20 20 20 7d 0d 20 20 46 |ager | }. F|
|00004eb0| 6c 75 73 68 45 76 65 6e | 74 73 28 65 76 65 72 79 |lushEven|ts(every|
|00004ec0| 45 76 65 6e 74 2c 30 29 | 3b 20 20 20 20 20 20 20 |Event,0)|; |
|00004ed0| 20 7b 20 63 6c 65 61 72 | 20 65 76 65 6e 74 73 20 | { clear| events |
|00004ee0| 66 72 6f 6d 20 70 72 65 | 76 69 6f 75 73 20 73 74 |from pre|vious st|
|00004ef0| 61 74 65 20 20 7d 0d 20 | 20 0d 20 20 57 49 54 48 |ate }. | . WITH|
|00004f00| 20 67 4d 6f 6f 76 42 6f | 78 20 44 4f 09 09 7b 20 | gMoovBo|x DO..{ |
|00004f10| 55 73 65 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |Use this| routine|
|00004f20| 20 74 6f 20 69 6e 69 74 | 20 74 68 65 20 77 69 6e | to init| the win|
|00004f30| 64 6f 77 20 72 65 63 74 | 20 7d 0d 20 20 20 20 42 |dow rect| }. B|
|00004f40| 45 47 49 4e 0d 09 20 20 | 74 6f 70 3a 3d 20 31 30 |EGIN.. |top:= 10|
|00004f50| 3b 0d 09 20 20 6c 65 66 | 74 3a 3d 20 33 30 30 3b |;.. lef|t:= 300;|
|00004f60| 0d 09 20 20 62 6f 74 74 | 6f 6d 20 3a 3d 20 31 39 |.. bott|om := 19|
|00004f70| 30 3b 0d 09 20 20 72 69 | 67 68 74 20 3a 3d 20 34 |0;.. ri|ght := 4|
|00004f80| 38 30 3b 0d 20 20 20 20 | 45 4e 44 3b 0d 09 0d 20 |80;. |END;... |
|00004f90| 20 61 72 72 6f 77 20 3a | 3d 20 50 69 63 48 61 6e | arrow :|= PicHan|
|00004fa0| 64 6c 65 28 47 65 74 52 | 65 73 6f 75 72 63 65 28 |dle(GetR|esource(|
|00004fb0| 27 50 49 43 54 27 2c 20 | 61 72 72 6f 77 73 49 44 |'PICT', |arrowsID|
|00004fc0| 29 29 3b 0d 20 20 49 46 | 20 61 72 72 6f 77 20 3c |));. IF| arrow <|
|00004fd0| 3e 20 4e 49 4c 20 54 48 | 45 4e 0d 20 20 20 20 42 |> NIL TH|EN. B|
|00004fe0| 45 47 49 4e 0d 09 20 20 | 44 65 74 61 63 68 52 65 |EGIN.. |DetachRe|
|00004ff0| 73 6f 75 72 63 65 28 48 | 61 6e 64 6c 65 28 61 72 |source(H|andle(ar|
|00005000| 72 6f 77 29 29 3b 0d 09 | 20 20 67 41 72 72 6f 77 |row));..| gArrow|
|00005010| 73 20 3a 3d 20 61 72 72 | 6f 77 3b 0d 09 45 4e 44 |s := arr|ow;..END|
|00005020| 0d 20 20 45 4c 53 45 0d | 20 20 20 20 67 41 72 72 |. ELSE.| gArr|
|00005030| 6f 77 73 20 3a 3d 20 4e | 49 4c 3b 0d 20 20 49 6e |ows := N|IL;. In|
|00005040| 69 74 56 61 72 73 3b 09 | 09 7b 20 74 6f 20 62 65 |itVars;.|.{ to be|
|00005050| 67 69 6e 20 77 69 74 68 | 09 09 09 09 09 09 7d 0d |gin with|......}.|
|00005060| 0d 20 20 67 53 79 73 74 | 65 6d 56 65 72 73 69 6f |. gSyst|emVersio|
|00005070| 6e 20 3a 3d 20 47 65 74 | 47 65 73 74 61 6c 74 52 |n := Get|GestaltR|
|00005080| 65 73 75 6c 74 20 28 67 | 65 73 74 61 6c 74 53 79 |esult (g|estaltSy|
|00005090| 73 74 65 6d 56 65 72 73 | 69 6f 6e 29 3b 0d 20 20 |stemVers|ion);. |
|000050a0| 0d 20 20 49 46 20 47 65 | 74 47 65 73 74 61 6c 74 |. IF Ge|tGestalt|
|000050b0| 52 65 73 75 6c 74 28 67 | 65 73 74 61 6c 74 51 75 |Result(g|estaltQu|
|000050c0| 69 63 6b 54 69 6d 65 29 | 20 3c 3e 20 30 20 54 48 |ickTime)| <> 0 TH|
|000050d0| 45 4e 20 7b 20 7a 65 72 | 6f 20 6d 65 61 6e 73 20 |EN { zer|o means |
|000050e0| 6e 6f 20 73 75 63 68 20 | 73 65 6c 65 63 74 6f 72 |no such |selector|
|000050f0| 20 7d 0d 20 20 20 20 72 | 65 73 75 6c 74 3a 3d 20 | }. r|esult:= |
|00005100| 45 6e 74 65 72 4d 6f 76 | 69 65 73 0d 20 20 45 4c |EnterMov|ies. EL|
|00005110| 53 45 0d 20 20 20 20 72 | 65 73 75 6c 74 20 3a 3d |SE. r|esult :=|
|00005120| 20 6d 6f 76 69 65 54 6f | 6f 6c 62 6f 78 55 6e 69 | movieTo|olboxUni|
|00005130| 74 69 61 6c 69 7a 65 64 | 3b 0d 20 20 49 6e 69 74 |tialized|;. Init|
|00005140| 53 79 73 74 65 6d 20 3a | 3d 20 72 65 73 75 6c 74 |System :|= result|
|00005150| 3b 0d 20 20 0d 45 4e 44 | 3b 20 28 2a 20 49 6e 69 |;. .END|; (* Ini|
|00005160| 74 53 79 73 74 65 6d 20 | 2a 29 0d 0d 50 52 4f 43 |tSystem |*)..PROC|
|00005170| 45 44 55 52 45 20 43 6f | 6e 76 65 72 74 4f 6c 64 |EDURE Co|nvertOld|
|00005180| 54 6f 4e 65 77 28 6f 6c | 64 53 46 3a 20 53 46 52 |ToNew(ol|dSF: SFR|
|00005190| 65 70 6c 79 3b 20 56 41 | 52 20 6e 65 77 53 46 3a |eply; VA|R newSF:|
|000051a0| 20 53 74 61 6e 64 61 72 | 64 46 69 6c 65 52 65 70 | Standar|dFileRep|
|000051b0| 6c 79 29 3b 0d 7b 20 0d | 20 20 20 20 70 75 72 70 |ly);.{ .| purp|
|000051c0| 6f 73 65 20 20 20 20 20 | 20 20 20 20 63 6f 6e 76 |ose | conv|
|000051d0| 65 72 74 73 20 61 6e 20 | 6f 6c 64 20 73 74 79 6c |erts an |old styl|
|000051e0| 65 20 53 46 52 65 70 6c | 79 20 69 6e 6f 74 20 61 |e SFRepl|y inot a|
|000051f0| 20 73 79 73 74 65 6d 20 | 37 0d 09 09 09 09 09 53 | system |7......S|
|00005200| 74 61 6e 64 61 72 64 46 | 69 6c 65 52 65 70 6c 79 |tandardF|ileReply|
|00005210| 2e 0d 7d 0d 56 41 52 09 | 09 65 72 72 3a 09 09 09 |..}.VAR.|.err:...|
|00005220| 4f 53 45 72 72 3b 0d 09 | 09 69 67 6e 6f 72 65 50 |OSErr;..|.ignoreP|
|00005230| 72 6f 63 3a 09 09 4c 4f | 4e 47 49 4e 54 3b 0d 09 |roc:..LO|NGINT;..|
|00005240| 09 0d 42 45 47 49 4e 0d | 20 20 09 57 49 54 48 20 |..BEGIN.| .WITH |
|00005250| 6e 65 77 53 46 2c 20 6f | 6c 64 53 46 20 44 4f 0d |newSF, o|ldSF DO.|
|00005260| 09 20 20 42 45 47 49 4e | 0d 09 09 73 66 47 6f 6f |. BEGIN|...sfGoo|
|00005270| 64 20 3a 3d 20 67 6f 6f | 64 3b 0d 09 09 73 66 52 |d := goo|d;...sfR|
|00005280| 65 70 6c 61 63 69 6e 67 | 20 3a 3d 20 63 6f 70 79 |eplacing| := copy|
|00005290| 3b 0d 09 09 73 66 54 79 | 70 65 20 3a 3d 20 66 54 |;...sfTy|pe := fT|
|000052a0| 79 70 65 3b 0d 09 09 65 | 72 72 20 3a 3d 20 46 53 |ype;...e|rr := FS|
|000052b0| 4d 61 6b 65 46 53 53 70 | 65 63 28 76 52 65 66 4e |MakeFSSp|ec(vRefN|
|000052c0| 75 6d 2c 20 30 2c 20 66 | 4e 61 6d 65 2c 20 73 66 |um, 0, f|Name, sf|
|000052d0| 46 69 6c 65 29 3b 0d 09 | 09 73 66 53 63 72 69 70 |File);..|.sfScrip|
|000052e0| 74 20 3a 3d 20 69 75 53 | 79 73 74 65 6d 53 63 72 |t := iuS|ystemScr|
|000052f0| 69 70 74 3b 0d 09 09 73 | 66 46 6c 61 67 73 20 3a |ipt;...s|fFlags :|
|00005300| 3d 20 30 3b 0d 09 09 73 | 66 49 73 46 6f 6c 64 65 |= 0;...s|fIsFolde|
|00005310| 72 20 3a 3d 20 66 61 6c | 73 65 3b 0d 09 09 73 66 |r := fal|se;...sf|
|00005320| 49 73 56 6f 6c 75 6d 65 | 20 3a 3d 20 66 61 6c 73 |IsVolume| := fals|
|00005330| 65 3b 0d 09 09 73 66 52 | 65 73 65 72 76 65 64 31 |e;...sfR|eserved1|
|00005340| 20 3a 3d 20 30 3b 0d 09 | 09 73 66 52 65 73 65 72 | := 0;..|.sfReser|
|00005350| 76 65 64 32 20 3a 3d 20 | 30 3b 0d 09 20 20 45 4e |ved2 := |0;.. EN|
|00005360| 44 3b 0d 45 4e 44 3b 0d | 0d 46 55 4e 43 54 49 4f |D;.END;.|.FUNCTIO|
|00005370| 4e 20 44 69 73 70 6c 61 | 79 47 65 74 46 69 6c 65 |N Displa|yGetFile|
|00005380| 28 70 72 6f 6d 70 74 3a | 20 53 74 72 32 35 35 3b |(prompt:| Str255;|
|00005390| 20 56 41 52 20 72 65 70 | 6c 79 3a 20 53 74 61 6e | VAR rep|ly: Stan|
|000053a0| 64 61 72 64 46 69 6c 65 | 52 65 70 6c 79 29 3a 20 |dardFile|Reply): |
|000053b0| 42 4f 4f 4c 45 41 4e 3b | 0d 7b 20 0d 20 20 20 20 |BOOLEAN;|.{ . |
|000053c0| 70 75 72 70 6f 73 65 20 | 20 20 20 20 20 20 20 20 |purpose | |
|000053d0| 70 72 6f 6d 70 20 74 68 | 65 20 75 73 65 72 20 74 |promp th|e user t|
|000053e0| 6f 20 73 65 6c 65 63 74 | 20 61 20 66 69 6c 65 20 |o select| a file |
|000053f0| 77 6f 72 6b 73 20 69 6e | 20 62 6f 74 68 20 73 79 |works in| both sy|
|00005400| 73 74 65 6d 20 36 20 61 | 6e 64 20 37 2e 0d 7d 0d |stem 6 a|nd 7..}.|
|00005410| 56 41 52 09 09 66 69 6c | 65 54 79 70 65 73 3a 09 |VAR..fil|eTypes:.|
|00005420| 09 53 46 54 79 70 65 4c | 69 73 74 3b 0d 09 09 6c |.SFTypeL|ist;...l|
|00005430| 6f 63 61 6c 52 65 70 6c | 79 3a 09 09 53 46 52 65 |ocalRepl|y:..SFRe|
|00005440| 70 6c 79 3b 0d 09 09 77 | 68 65 72 65 3a 09 09 09 |ply;...w|here:...|
|00005450| 50 6f 69 6e 74 3b 0d 09 | 09 65 72 72 3a 09 09 09 |Point;..|.err:...|
|00005460| 4f 53 65 72 72 3b 0d 42 | 45 47 49 4e 0d 09 77 68 |OSerr;.B|EGIN..wh|
|00005470| 65 72 65 2e 68 3a 3d 31 | 30 30 3b 0d 09 77 68 65 |ere.h:=1|00;..whe|
|00005480| 72 65 2e 76 3a 3d 31 30 | 30 3b 0d 09 66 69 6c 65 |re.v:=10|0;..file|
|00005490| 54 79 70 65 73 5b 30 5d | 3a 3d 27 4d 6f 6f 56 27 |Types[0]|:='MooV'|
|000054a0| 3b 0d 09 0d 09 49 46 20 | 67 53 79 73 74 65 6d 56 |;....IF |gSystemV|
|000054b0| 65 72 73 69 6f 6e 20 3e | 3d 20 24 30 37 30 30 20 |ersion >|= $0700 |
|000054c0| 54 48 45 4e 20 09 7b 20 | 6e 65 77 20 73 74 61 6e |THEN .{ |new stan|
|000054d0| 64 61 72 64 20 66 69 6c | 65 20 61 76 61 69 6c 61 |dard fil|e availa|
|000054e0| 62 6c 65 20 7d 0d 09 20 | 20 53 74 61 6e 64 61 72 |ble }.. | Standar|
|000054f0| 64 47 65 74 46 69 6c 65 | 50 72 65 76 69 65 77 28 |dGetFile|Preview(|
|00005500| 6e 69 6c 2c 20 31 2c 20 | 66 69 6c 65 54 79 70 65 |nil, 1, |fileType|
|00005510| 73 2c 20 72 65 70 6c 79 | 29 09 0d 09 45 4c 53 45 |s, reply|)...ELSE|
|00005520| 0d 09 20 20 42 45 47 49 | 4e 0d 09 20 20 20 20 53 |.. BEGI|N.. S|
|00005530| 46 47 65 74 46 49 6c 65 | 28 77 68 65 72 65 2c 20 |FGetFIle|(where, |
|00005540| 70 72 6f 6d 70 74 2c 20 | 6e 69 6c 2c 20 31 2c 20 |prompt, |nil, 1, |
|00005550| 66 69 6c 65 54 79 70 65 | 73 2c 20 6e 69 6c 2c 20 |fileType|s, nil, |
|00005560| 6c 6f 63 61 6c 52 65 70 | 6c 79 29 3b 0d 20 20 20 |localRep|ly);. |
|00005570| 20 20 20 20 20 43 6f 6e | 76 65 72 74 4f 6c 64 54 | Con|vertOldT|
|00005580| 6f 4e 65 77 28 6c 6f 63 | 61 6c 52 65 70 6c 79 2c |oNew(loc|alReply,|
|00005590| 20 72 65 70 6c 79 29 3b | 0d 09 20 20 45 4e 44 3b | reply);|.. END;|
|000055a0| 0d 09 44 69 73 70 6c 61 | 79 47 65 74 46 69 6c 65 |..Displa|yGetFile|
|000055b0| 20 3a 3d 20 72 65 70 6c | 79 2e 73 66 47 6f 6f 64 | := repl|y.sfGood|
|000055c0| 3b 0d 45 4e 44 3b 0d 0d | 28 2a 2a 2a 2a 2a 2a 2a |;.END;..|(*******|
|000055d0| 20 45 4e 44 20 41 75 78 | 69 6c 69 61 72 79 20 72 | END Aux|iliary r|
|000055e0| 6f 75 74 69 6e 65 73 20 | 2a 2a 2a 2a 2a 2a 2a 2a |outines |********|
|000055f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005600| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005610| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005620| 29 0d 0d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |).......|........|
|00005630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005680| 00 00 01 00 00 00 01 86 | 00 00 00 86 00 00 00 4a |........|.......J|
|00005690| 0d df ff f1 ff f8 88 88 | 88 8f ff f1 ff ff ff d0 |........|........|
|000056a0| 00 ff ff f1 ff ff ff ff | 11 ff ff f1 ff ff fc 00 |........|........|
|000056b0| 13 54 69 6d 65 42 61 73 | 65 53 69 6d 70 6c 65 41 |.TimeBas|eSimpleA|
|000056c0| 75 78 2e 70 02 00 00 00 | 54 45 58 54 4d 50 53 20 |ux.p....|TEXTMPS |
|000056d0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 78 00 00 |..TEXTMP|S ...x..|
|000056e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000056f0| 00 00 a5 24 7a c0 00 00 | 55 a3 00 00 01 d0 00 00 |...$z...|U.......|
|00005700| 0d dc df fc ff ff ff ff | ff ff fe 00 00 00 00 00 |........|........|
|00005710| 00 ef dd 0d ff ff ff ff | ff fe c0 00 00 00 00 00 |........|........|
|00005720| 00 0e 00 ef dd ff ff ff | fd c0 00 00 00 00 00 00 |........|........|
|00005730| 00 00 00 0c 00 cc cc cc | c0 00 00 00 00 00 00 00 |........|........|
|00005740| 00 60 03 f8 0f ff 30 1e | 77 cc f0 d6 f4 07 25 ae |.`....0.|w.....%.|
|00005750| 65 ae e4 2c 23 6e 58 5c | 5f 5c 40 18 7f f0 0e 00 |e..,#nX\|_\@.....|
|00005760| 00 60 01 f8 07 ff 1f fe | bf fc 7f fe ff ff 7f fe |.`......|........|
|00005770| 7f fe ff fe 3f fe 7f fc | 7f fc ff f8 7f e0 0e 00 |....?...|........|
|00005780| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 20 66 6f |...H..Mo|naco. fo|
|00005790| 72 20 74 68 65 20 6d 61 | 6e 75 61 6c 20 2a 2a 2a |r the ma|nual ***|
|000057a0| 29 0d 0d 28 2a 2a 00 06 | 00 04 00 50 00 20 01 dd |)..(**..|...P. ..|
|000057b0| 02 3d 00 50 00 20 01 dd | 02 3d a6 d2 bf 46 00 00 |.=.P. ..|.=...F..|
|000057c0| 05 51 00 00 05 5a 00 00 | 04 bd 01 00 00 00 00 14 |.Q...Z..|........|
|000057d0| 00 01 00 00 37 da 00 00 | 37 e2 09 44 72 61 77 52 |....7...|7..DrawR|
|000057e0| 61 74 65 00 00 00 00 1e | 00 50 00 20 01 dd 02 3d |ate.....|.P. ...=|
|000057f0| 00 50 00 20 01 dd 02 3d | 00 00 04 bd 00 00 00 00 |.P. ...=|........|
|00005800| 00 00 00 00 00 00 00 00 | 01 00 00 00 01 86 00 00 |........|........|
|00005810| 00 86 00 00 00 4a 00 3e | 99 30 0c 20 00 00 00 1c |.....J.>|.0. ....|
|00005820| 00 4a 00 00 4d 50 53 52 | 00 02 00 0a 03 ed ff ff |.J..MPSR|........|
|00005830| 00 00 00 00 00 00 00 00 | 03 ef ff ff 00 00 00 4c |........|.......L|
|00005840| 00 00 00 00 03 f0 ff ff | 00 00 00 64 00 40 98 38 |........|...d.@.8|
|00005850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+